Struct implementing interface
suggest changepublic interface IShape
{
decimal Area();
}
public struct Rectangle : IShape
{
public decimal Length { get; set; }
public decimal Width { get; set; }
public decimal Area()
{
return Length * Width;
}
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents