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 ...

Get C# 7 and .NET Core Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.