1. Trang chủ
  2. » Công Nghệ Thông Tin

02 c advanced features

43 2 0

Đ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

Thông tin cơ bản

Định dạng
Số trang 43
Dung lượng 534,58 KB

Nội dung

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Ừ KHÓA LIÊN QUAN

w