.NET: CTS (Common Type System), type, sealed class, interface, abstract class, structs vs classes, enumeration, delegates, built-in data types

type: generic term used to refer to: class, structure, interface, enumeration, delegate.

type member: constructor, finalizer, static constructor, nested type, operator, method, property, indexer, field, read only field, constant, event.

static members are bound at the class level, instance members are bound at the object level.

sealed class: cannot function as a base class to other classes

interface: collection of abstract members that provide a contract between the object and object user. Only members may exist, no implementation. A given class may implement any number of interfaces.

abstract class: can’t instantiate, used to define common behavior for derived types, can have implementation.

structs are value-types. classes are reference-types.

interfaces do not derive from a common base interface like IUnknown.

enumerations derive from System.Enum and by default the storage used to hold them is a32-bit integer.

delegates are the same as a type-safe C-style function pointer. They derive fromSystem.MulticastDelegate.

.NET built in data types (intrinsic CTS data types):

CTS Data Type, C# Keyword, C++ Keyword

System.Byte, byte, unsigned char
System.SByte, sbyte, signed char
System.Int16, short, short
System.Int32, int, int or long
System.Int64, long, __int64
System.UInt16, ushort, unsigned short
System.UInt32, uint, unsigned int or unsigned long
System.UInt64, ulong, unsigned __int64
System.Single, float, Float
System.Double, double, Double
System.Object, object, Object^
System.Char, char, wchar_t
System.String, string, String^
System.Decimal, decimal, Decimal
System.Boolean, bool, Bool

.NET: BCL

BCL: “base class libraries”, encapsulate primitives such as threads, graphical rendering, file input/output, data access, winforms, security, xml/soap, webforms.

CLR includes CTS and CLS:

.NET: JIT, CLR, CTS

JIT: “just in time” compiler that translates IL (intermediate language) into native machine code at runtime. Also known as ‘Jitter’, it will cache already compiled machine code in memory.

CLR: “common language runtime”, primary role is to locate, load, and manage .NET types on your behalf. Also takes care of memory management and performs security checks.

CTS: “common type system”, describes all possible data types and programming constructs supported by the runtime, specifies how they can interact with each other, details how they are represented in the .NET metadata format.

CLS: “common language specification”, subset of common types and programming constructs that all .NET programming languages can agree on.