02 c advanced features

43 1 0
02 c advanced features

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

PowerPoint Presentation C# Advanced features Feb 2016 Agenda Automatic type, property Object & Collection initializer Anonymous type, method Delegate & event, polymorphism Reference Miscellaneous Auto[.]

C# Advanced features Feb 2016 Agenda Automatic: type, property Object & Collection initializer Anonymous: type, method Delegate & event, polymorphism Reference Miscellaneous Automatic type & property Automatic type inference  Implicitly Typed Local Variables Questions Is it like Javascript var? (Loosely typed, dynamic) What is it actually? What is the benefit? Why would developer want to use it?  Actually, when to use and when not to use? My best usage scenario  List declaration  List iteration Later usage in this course  LINQ Automatic property  OOP encapsulation rule  Never expose public fields, use property instead!  Better for logic adding later No breaking changes! => Better maintenance  Properties can be databound, fields cannot! Equivalent  Whatever you write, the right code will always be generated! (Kind of similarity, not exactly) Have VS encapsulated for u  Using refactor feature 10

Ngày đăng: 09/04/2023, 06:16

Tài liệu cùng người dùng

Tài liệu liên quan