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

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.
主站蜘蛛池模板: 罗城| 永胜县| 福清市| 雅江县| 湘潭县| 车险| 玉田县| 奉节县| 宝山区| 墨竹工卡县| 鸡东县| 铜梁县| 龙游县| 天津市| 江阴市| 屯留县| 伊春市| 阳泉市| 临江市| 始兴县| 化州市| 孟州市| 涟源市| 右玉县| 三都| 九龙县| 思南县| 洛隆县| 禄丰县| 泌阳县| 开原市| 乌鲁木齐县| 竹溪县| 绥芬河市| 临城县| 神木县| 阳东县| 朝阳县| 和林格尔县| 麦盖提县| 康定县|