Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Effective C#50 Specific Ways to Improve Your C# Second Edition phần 2
Đang chuẩn bị liên kết để tải về tài liệu:
Effective C#50 Specific Ways to Improve Your C# Second Edition phần 2
Ngọc Hải
89
34
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Câu trả lời sẽ khác nhau, nhưng phải có tất cả bốn yếu tố. 1. Luận văn: Bất chấp những hiểm nguy, Internet vẫn là một phương tiện hoàn toàn miễn phí và không bị kiểm duyệt. 2. Hỗ trợ: • Kiểm duyệt sẽ vi phạm | 22 I Chapter 1 C Language Idioms Trace.WriteLine Exiting Checkstate for Person endif Using the if and endif pragmas you ve created an empty method in your release builds. The CheckState method gets called in all builds release and debug. It doesn t do anything in the release builds but you pay for the method call. You also pay a small cost to load and JIT the empty routine. This practice works fine but can lead to subtle bugs that appear only in release builds. The following common mistake shows what can happen when you use pragmas for conditional compilation public void Func string msg null if DEBUG msg GetDiagnostics endif Console.WriteLine msg Everything works fine in your debug build but your release builds happily print a blank message. That s not your intent. You goofed but the compiler couldn t help you. You have code that is fundamental to your logic inside a conditional block. Sprinkling your source code with if endif blocks makes it hard to diagnose the differences in behavior with the different builds. C has a better alternative the Conditional attribute. Using the Conditional attribute you can isolate functions that should be part of your classes only when a particular environment variable is defined or set to a certain value. The most common use of this feature is to instrument your code with debugging statements. The .NET Framework library already has the basic functionality you need for this use. This example shows how to use the debugging capabilities in the .NET Framework Library to show you how conditional attributes work and when to add them to your code. When you build the Person object you add a method to verify the object invariants From the Library of Wow eBook Item 4 Use Conditional Attributes Instead of if I 23 private void CheckState Grab the name of the calling routine string methodName new StackTrace .GetFrame 1 .GetMethod .Name Trace.WriteLine Entering CheckState for Person Trace.Write tcalled by Trace.WriteLine methodName Debug.Assert
TÀI LIỆU LIÊN QUAN
crossorigin="anonymous">
Đã 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.