TAILIEUCHUNG - ASP.NET 4 Unleased - p 78

Nội-Một nội bộ lớp, phương pháp, hoặc tài sản có thể được truy cập chỉ bằng một thành phần trong cùng một assembly (dll file). Bởi vì các trang được biên dịch vào hội đồng khác với các nội dung của thư mục App_Code, bạn không thể truy cập một thành viên nội bộ của một bên ngoài lớp học của các thư mục App_Code. . Tin-Một lớp học tư nhân | 744 CHAPTER 17 Building Components Internal An internal class method or property can be accessed only by a component within the same assembly dll file . Because pages are compiled into different assemblies than the contents of the App_Code folder you cannot access an internal member of a class outside of the App_Code folder. Private A private class method or property can be accessed only within the class itself. Visual Basic .NET supports the following access modifiers also called access levels which you can use when declaring a class method or property Public A Public class method or property has no access restrictions. Protected A Protected method or property can be accessed only within the class itself or a derived class. Friend A Friend class method or property can be accessed only by a component within the same assembly dll file . Because pages are compiled into different assemblies than the contents of the App_Code folder you cannot access a Friend member of a class outside of the App_Code folder. Protected Friend A Protected Friend method or property can be accessed within the class itself or a derived class or any other class located in the same assembly. Private A Private class method or property can be accessed only within the class itself. Using access modifiers is useful when you develop a component library that might be used by other members of your development team or your future self . For example you should mark all methods that you don t want to expose from your component as private. Intellisense and Components Visual Web Developer automatically pops up with Intellisense when you type the names of classes properties or methods in Source view. You can add comments that appear in Intellisense to your custom components to make it easier for other developers to use your components. If you add XML comments to a component the contents of the XML comments appear automatically in Intellisense. For example the component in Listing .

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.