Numeric Properties in XPO(XPO中的数字属性)
The example below illustrates how to implement Numeric Properties in an XPO persistent class.
下面的示例说明了如何在XPO持久类中实现数字属性。
C#
private double doubleProperty;
public double DoubleProperty {
get { return doubleProperty; }
set { SetPropertyValue(nameof(DoubleProperty), ref doubleProperty, value); }
}
private float singleProperty;
public float SingleProperty {
get { return singleProperty; }
set { SetPropertyValue(nameof(SingleProperty), ref singleProperty, value); }
}
private long longProperty;
public long LongProperty {
get { return longProperty; }
set { SetPropertyValue(nameof(LongProperty), ref longProperty, value); }
}
private int integerProperty;
public int IntegerProperty {
get { return integerProperty; }
set { SetPropertyValue(nameof(IntegerProperty), ref integerProperty, value); }
}
private decimal decimalProperty;
public decimal DecimalProperty {
get { return decimalProperty; }
set { SetPropertyValue(nameof(DecimalProperty), ref decimalProperty, value); }
}
private byte byteProperty;
public byte ByteProperty {
get { return byteProperty; }
set { SetPropertyValue(nameof(ByteProperty), ref byteProperty, value); }
}