如何总结行中单独列中字段的值?
public class Ball
{
public int BallId { get; set; }
public int Ball1 { get; set; }
public int Ball2 { get; set; }
public int Ball3 { get; set; }
public int Summa {
get {return Ball1 + Ball2;}
private set { }
}
答案 0 :(得分:0)
创建单独的部分调用并定义您的属性。
public partial class Ball
{
public int Summa {
get {return Ball1 + Ball2;}
private set { }
}