คำถามติดแท็ก callermembername

1
[CallerMemberName] ทำงานช้าเมื่อเทียบกับทางเลือกอื่นเมื่อใช้ INotifyPropertyChanged หรือไม่
มีบทความที่ดีที่แนะนำให้มีวิธีการที่แตกต่างกันสำหรับการดำเนินการINotifyPropertyChanged พิจารณาการใช้งานพื้นฐานต่อไปนี้: class BasicClass : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private void FirePropertyChanged(string propertyName) { var handler = PropertyChanged; if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName)); } private int sampleIntField; public int SampleIntProperty { get { return sampleIntField; } set { if (value != sampleIntField) { sampleIntField = value; …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.