December 2018
Beginner to intermediate
668 pages
15h 30m
English
In either Visual Studio 2017 or Visual Studio Code, change the namespace to Packt.CS7, because it is important to put your classes in a logically named namespace. In this, and the next chapter, we will learn about OOP and most of the new language features of C# 7.0 and 7.1.
Your class file should now look like the following code:
using System;
namespace Packt.CS7
{
public class Person
{
}
}
Note that the C# keyword public is applied before class. This keyword is called an access modifier, and it allows all code to access this class. If you do not explicitly apply the public keyword, then it would only be accessible within the assembly that defined it. We need it to be accessible outside the assembly too. This type does not ...
Read now
Unlock full access