4.2. Classes
Although classes constitute the fundamental concept in Java, in C# they are one of the various types supported by the runtime. An instance of the System.Type class can be a class, an interface, a value type, an array, a pointer, or an enumeration. Chapter 7 discusses System.Type.
A class can be thought of as the metadata, or the definition, of an object. A class has members, and these can be its constructors, methods, fields, properties, and operators. Members help maintain and query the state of the objects created by a class. Members that maintain the state of any one object are called instance members, and members that maintain the state of all objects created on that class are called static members. Before we explore the instance ...
Get .NET for Java Developers: Migrating to C# 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.