官术网_书友最值得收藏!

  • 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.
主站蜘蛛池模板: 嘉定区| 宁远县| 阿拉善右旗| 宁海县| 阳江市| 汕头市| 万年县| 大港区| 凤山市| 盈江县| 吴川市| 佳木斯市| 贡山| 获嘉县| 乌什县| 钦州市| 铁岭县| 长武县| 金门县| 隆子县| 呼玛县| 苍溪县| 乌海市| 云浮市| 曲麻莱县| 宿松县| 大新县| 麦盖提县| 集安市| 卫辉市| 遂昌县| 罗田县| 铜川市| 甘谷县| 忻州市| 昌图县| 兴海县| 大安市| 威海市| 绥芬河市| 修水县|