How to access derived class members from an interface?
问题 I have three classes; Stamp, Letter and Parcel that implement an interface IProduct and they also have some of their own functionality. public interface IProduct { string Name { get; } int Quantity { get; set; } float Amount { get; } } public class Stamp : IProduct { public string Name { get { return "Stamp"; } } public int Quantity { get; set; } public float Amount { get; set; } public float UnitPrice { get; set; } } public class Letter : IProduct { public string Name { get { return "Letter"