- 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.
推薦閱讀
- Web應用系統開發實踐(C#)
- 基于粒計算模型的圖像處理
- LabVIEW2018中文版 虛擬儀器程序設計自學手冊
- Learning Linux Binary Analysis
- PostgreSQL 11從入門到精通(視頻教學版)
- SQL Server 2012數據庫管理與開發項目教程
- ASP.NET程序設計教程
- Corona SDK Mobile Game Development:Beginner's Guide(Second Edition)
- Python機器學習算法: 原理、實現與案例
- Python深度學習:模型、方法與實現
- Scratch3.0趣味編程動手玩:比賽訓練營
- C#程序設計基礎入門教程
- Android應用程序設計
- 大話代碼架構:項目實戰版
- 自己動手構建編程語言:如何設計編譯器、解釋器和DSL