Lập trình .net 4.0 và visual studio 2010 part 7

Các chức năng năng động mới trong NET 4,0 cho phép. Chúng tôi để làm việc với các loại chưa được biết thời gian biên dịch trong một trực quan và dễ dàng để đọc cách. Nhiều người trong số bạn có thể tự hỏi những thay đổi năng động có thể làm những gì cho bạn. Những thay đổi năng động cho phép chúng ta làm như sau: | CHAPTER 3 LANGUAGE AND DYNAMIC CHANGES Further Reading Variance is a difficult subject so for more information please refer to the following blogs and book http charlie archive 2008 10 28 http ericlippert archive tags Covariance and Contravariance Skeet Jon. 2008 C in depth. Manning Publications. Dynamic Enhancements The new dynamic functionality in .NET allows us to work with types not known at compile time in an intuitive and easy to read way. Many of you may be wondering what can the dynamic changes do for you. The dynamic changes allow us to do the following Write more readable code with fewer casting operations. Create new languages to utilize the .NET Framework such as IronPython and IronRuby. Additionally .NET s dynamic architecture allows these languages to automatically benefit from future framework other dynamic languages and their libraries. Utilize other dynamic languages and their libraries from C and . Introduce customization scripting and debugging querying functionality within our applications. Work with COM objects more easily. Microsoft Office COM is going to be around for some time whether you like it or not. Many other cool uses we haven t thought of yet. Can t We Do This Kind of Thing Already in .NET .NET has a number of classes and methods for working with types not known at compile time such as reflection and expression trees. However if you have spent much time with these technologies you will known that they can make for some clunky and difficult to read code. As I will show you the dynamic enhancements can make your life much easier. Before we look at how to use the dynamic enhancements we need to understand the difference between statically and dynamically typed languages. Static Languages In a statically typed language such as C or C the compiler checks you are using types correctly at compile time. .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.