标签:style c class blog code java
不用担心List没有创建问题。
private ObservableCollection<EquipmentItem> _optionalCollection; public ObservableCollection<EquipmentItem> OptionalCollection { get { if (this._optionalCollection == null) { this._optionalCollection = new ObservableCollection<EquipmentItem>(); } return this._optionalCollection; } set { if (value != this._optionalCollection) { if (this._optionalCollection != null) { this._optionalCollection.Clear(); } this._optionalCollection = value; this.RaisePropertyChangedEvent("OptionalCollection"); } } }
C# - 创建List属性的简单方法,布布扣,bubuko.com
标签:style c class blog code java
原文地址:http://www.cnblogs.com/mantian/p/3756535.html