- 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.
推薦閱讀
- R語言數(shù)據(jù)分析從入門到精通
- 控糖控脂健康餐
- 軟件測(cè)試項(xiàng)目實(shí)戰(zhàn)之性能測(cè)試篇
- Python Deep Learning
- Python數(shù)據(jù)分析從0到1
- C語言程序設(shè)計(jì)實(shí)驗(yàn)指導(dǎo) (第2版)
- Visual Basic程序設(shè)計(jì)上機(jī)實(shí)驗(yàn)教程
- D3.js By Example
- TypeScript 2.x By Example
- Python硬件編程實(shí)戰(zhàn)
- Software-Defined Networking with OpenFlow(Second Edition)
- VMware vSphere 5.5 Cookbook
- Beginning PHP
- Clojure編程樂趣
- C語言程序設(shè)計(jì)實(shí)驗(yàn)指導(dǎo)與習(xí)題精解