Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 427 Bytes
namespace InterfaceProperties
{
public interface IRegularPolygon
{
int NumberOfSides { get; }
int SideLength { get; set; }
// Note: These two lines of code are equivalent:
// a calculated property with only a getter.
//double Perimeter { get => NumberOfSides * SideLength; }
double Perimeter => NumberOfSides * SideLength;
double Area { get; }
}
}
You can’t perform that action at this time.