Why is this valid
public struct MyStruct
{
public MyStruct(double value)
{
myField = value;
}
private double myField;
public double MyProperty
{
get
{
return myField;
}
set
{
myField = value;
}
}
}
and this is not
public struct MyStruct
{
public MyStruct(double value)
{
MyProperty = value;
}
public double MyProperty
{
get;
set;
}
}