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

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.
主站蜘蛛池模板: 玉屏| 平舆县| 伊金霍洛旗| 大洼县| 四子王旗| 彰化市| 昌乐县| 克什克腾旗| 丘北县| 星子县| 工布江达县| 襄垣县| 德安县| 田林县| 武乡县| 图们市| 怀集县| 泽州县| 大安市| 滨州市| 田东县| 钟山县| 宁都县| 延寿县| 大庆市| 凌源市| 长乐市| 东台市| 喀喇沁旗| 城固县| 江达县| 岑巩县| 宜君县| 新密市| 舒城县| 嘉兴市| 余姚市| 兴隆县| 商洛市| 郁南县| 凌源市|