TAILIEUCHUNG - Lập trình .net 4.0 và visual studio 2010 part 5

Thay đổi ngôn ngữ và năng động Có một số thay đổi chào mừng bạn đến C # và , và cải tiến chính cho các ngôn ngữ thường gặp Runtime (CLR) và Base Class Library (BCL) trong NET Tôi có những thay đổi này tách thành hai chương: ngôn ngữ (chương này) và CLR và BCL (Chương 4), mặc dù có là tất nhiên một số chồng lên nhau. | CHAPTER 3 Language and Dynamic Changes There are some welcome changes to C and and major enhancements to the Common Language Runtime CLR and Base Class Library BCL in .NET . I have separated these changes into two chapters language this chapter and CLR and BCL Chapter 4 although there is of course some overlap. In this chapter I will be covering the following Future co-evolution of VB and C Changes to C and VB Improved COM interoperability Variance Dynamic code F Future Co-evolution of VB and C All .NET languages compile to the same IL code so there is really no reason a feature should be present in one language and not another. Traditionally C got most of the new features but not anymore. Microsoft has stated that it will now aim to ensure that VB and C contain the same functionality. and C will be kept in sync like an elastic band when a new feature is introduced in one language it will be brought into the other language in the next release pinging the two into line. There will of course continue to be style differences between the languages so don t expect to see semi-colons appearing in VB because that would be very silly. This release tries to sync the two languages fixes an old constraint and introduces some great dynamic functionality. No longer will developers miss out on anonymous methods and C developers will now benefit from named and optional parameters. C Enhancements C 2010 introduces two useful features that have been present in VB for a long time optional and named parameters technically two separate features but often found together . 39 CHAPTER 3 LANGUAGE AND DYNAMIC CHANGES Named and Optional Parameters Named parameters allow you to pass parameters into a function in any order and are near essential when using C s other new feature optional parameters. To use a named parameter simply specify the parameter name followed by a colon and then the value you are passing into a function. The following code illustrates passing the

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.