为什么这是有效的
public struct MyStruct
{
public MyStruct(double value)
{
myField = value;
}
private double myField;
public double MyProperty
{
get
{
return myField;
}
set
{
myField = value;
}
}
}
这不是
public struct MyStruct
{
public MyStruct(double value)
{
MyProperty = value;
}
public double MyProperty
{
get;
set;
}
}