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.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.70.185