abstract class Parent
{
public abstract int Number { get; }
}
class Child : Parent
{
public override int Number { get; }
public Child()
{
Number = 0;
}
}
The code below does not compile in Beef:
abstract class Parent
{
public abstract int Number { get; }
}
class Child : Parent
{
public override int Number { get; }
public this()
{
Number = 0;
}
}
The Beef compiler complains that: Property has no setter
I don't find it useful. Why wouldn't you specify a private setter? Having an exception to rules like that for constructors only is honestly a weird practice.
The code below works in C#:
The code below does not compile in Beef:
The Beef compiler complains that: Property has no setter