首页 > 其他分享 >学习011-08-03-01 Numeric Properties in XPO(XPO中的数字属性)

学习011-08-03-01 Numeric Properties in XPO(XPO中的数字属性)

时间:2024-10-09 11:47:30浏览次数:14  
标签:03 set return private nameof SetPropertyValue 01 XPO ref

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); }
}

标签:03,set,return,private,nameof,SetPropertyValue,01,XPO,ref
From: https://blog.csdn.net/thomastang200912_126/article/details/142783102

相关文章