class Person { public string Name { get; set; } public int Age { get; set; } public Person(string name, int age) { Name = name; Age = age; } }
Person john = new Person("John", 25); Person jane = new Person("Jane", 30);This creates two "Person" objects with different values for the "Name" and "Age" properties. Package library: The "System" namespace provides the base classes and types for C#, including the "Object" class from which all other classes are derived. Therefore, the "Person" class shown above doesn't belong to any specific package or library. However, in real-world applications, classes are often organized into packages or libraries for better modularity and abstraction. Examples of popular C# packages and libraries include the .NET Framework Class Library, the Microsoft.AspNetCore package for building web applications, and the Newtonsoft.Json library for working with JSON data.