- C# 7 and .NET Core Cookbook
- Dirk Strauss
- 192字
- 2021-07-03 00:12:02
How it works...
The class uses the scoping rules to hide certain functionality inside the class from the developer using the class. As mentioned earlier, the developer does not need to know how the calculations are done to return the value for the TWR. This all aids in making the class more useful and easy to implement. Here is a list of the various scopes available in C# along with their uses:
- Public: This is used with variables, properties, types, and methods and is visible anywhere.
- Private: This is used with variables, properties, types, and methods and is visible only in the block where they are defined.
- Protected: This is used with variables, properties, and methods. Don't think of this in terms of public or private. The protected scope is only visible inside the class in which it is used as well as in any inherited classes.
- Friend: This is used with variables, properties, and methods and can only be used by code in the same project or assembly.
- ProtectedFriend: This is used with variables, properties, and methods and is a combination (as the name suggests) of the protected and friend scopes.
推薦閱讀
- C語言程序設(shè)計(jì)教程
- 程序員面試筆試寶典
- 從程序員到架構(gòu)師:大數(shù)據(jù)量、緩存、高并發(fā)、微服務(wù)、多團(tuán)隊(duì)協(xié)同等核心場景實(shí)戰(zhàn)
- Mastering JBoss Enterprise Application Platform 7
- 數(shù)據(jù)結(jié)構(gòu)案例教程(C/C++版)
- Node.js全程實(shí)例
- ASP.NET Core 2 Fundamentals
- 計(jì)算機(jī)應(yīng)用基礎(chǔ)實(shí)踐教程
- Bootstrap 4 Cookbook
- NGINX Cookbook
- Mobile Device Exploitation Cookbook
- RubyMotion iOS Develoment Essentials
- OpenMP核心技術(shù)指南
- Python程序設(shè)計(jì)開發(fā)寶典
- Python Machine Learning Blueprints:Intuitive data projects you can relate to