Summary

The topics covered in this chapter are the basics of programming in the C# language. Using access modifiers, we can control access to different properties and methods in different modules of an application. While writing the code, a very common mistake that people make is to declare all the properties and methods as public. This is not the recommended way of programming in C#. We must logically evaluate the need for different access modifiers for each of the properties and methods present in a class.

Similarly, we should analyze the data types that we need to associate with each property used in the class. We must also analyze if we need a reference data type variable, or whether we are fine with a value type variable as they have a different implementation in the compiler memory and functionality. We should also utilize inheritance as it helps us to reuse code and structure our programs in a very precise manner.

In the next chapter , we will go through OOP concepts, which are the main building blocks of any high-level programming language like C#. We will go over polymorphism, abstraction, encapsulation, and inheritance and understand each of these concepts in detail, and will also go over some code examples to see their implementation.

..................Content has been hidden....................

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