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

Xử lý ngoại lệ đã được cải thiện trong NET với sự giới thiệu của . ExceptionServices tên miền không gian, trong đó có các lớp học để xử lý ngoại lệ tiên tiến. | CHAPTER 4 CLR AND BCL CHANGES Native Code Enhancements I will not be covering changes to native code so I have summarized some of the important changes here Support for real-time heap analysis. New integrated dump analysis and debugging tools. Tlbimp shared source is available from codeplex http . Support for 64-bit mode dump debugging has also been added. Mixed mode 64-bit debugging is now supported allowing you to transition from managed to native code. Exception Handling Exception handling has been improved in .NET with the introduction of the . Exceptionservices namespace which contains classes for advanced exception handling. CorruptedStateExceptions Many developers OK I might have done this too have written code such as the following try do something that may fail catch e . This is almost always a very naughty way to write code because all exceptions will be hidden. Hiding exceptions you don t know about is rarely a good thing and if you do know about them you should inevitably be handling them in a better way. Additionally there are some exceptions that should never be caught even by lazy developers such as lowdown beardy stuff such as access violations and calls to illegal instructions. These exceptions are potentially so dangerous that it s best to just shut down the application as quick as possible before it can do any further damage. So in .NET corrupted state exceptions will never be caught even if you specify a try a catch block. However if you do want to enable catching of corrupted state exceptions application-wide . to route them to an error-logging class you can add the following setting in your applications configuration file LegacyCorruptedStateExceptionsPolicy true This behavior can also be enabled on individual methods with the following attribute HandleProcessCorruptedStateExceptions 77 CHAPTER 4 CLR AND BCL CHANGES New Types Now that the lowdown changes are out of the way lets

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.