Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Introduction to the .NET Framework Class Library

The .NET Framework includes classes, interfaces, and value types that expedite and optimize the development process and provide access to system functionality. To facilitate interoperability between languages, the .NET Framework types are CLS-compliant and can therefore be used from any programming language whose compiler conforms to the common language specification (CLS).

The .NET Framework types are the foundation on which .NET applications, components, and controls are built. The .NET Framework includes types that perform the following functions:

  • Represent base data types and exceptions.
  • Encapsulate data structures.
  • Perform I/O.
  • Access information about loaded types.
  • Invoke .NET Framework security checks.
  • Provide data access, rich client-side GUI, and server-controlled, client-side GUI.

The .NET Framework provides a rich set of interfaces, as well as abstract and concrete (non-abstract) classes. You can use the concrete classes as is or, in many cases, derive your own classes from them. To use the functionality of an interface, you can either create a class that implements the interface or derive a class from one of the .NET Framework classes that implements the interface.

Naming Conventions

.NET Framework types use a dot syntax naming scheme that connotes a hierarchy. This technique groups related types into namespaces so they can be searched and referenced more easily. The first part of the full name — up to the rightmost dot — is the namespace name. The last part of the name is the type name. For example, System.Collections.ArrayList represents the ArrayList type, which belongs to the System.Collections namespace. The types in System.Collections can be used to manipulate collections of objects.

This naming scheme makes it easy for library developers extending the .NET Framework to create hierarchical groups of types and name them in a consistent, informative manner. It is expected that library developers will use the following guideline when creating names for their namespaces:

CompanyName.TechnologyName

For example, the namespace Microsoft.Word conforms to this guideline.

The use of naming patterns to group related types into namespaces is a very useful way to build and document class libraries. However, this naming scheme has no effect on visibility, member access, inheritance, security, or binding. A namespace can be partitioned across multiple assemblies and a single assembly can contain types from multiple namespaces. The assembly provides the formal structure for versioning, deployment, security, loading, and visibility in the common language runtime.

For more information on namespaces and type names, see Common Type System.

System Namespace

The System namespace is the root namespace for fundamental types in the .NET Framework. This namespace includes classes that represent the base data types used by all applications: Object (the root of the inheritance hierarchy), Byte, Char, Array, Int32, String, and so on. Many of these types correspond to the primitive data types that your programming language uses. When you write code using .NET Framework types, you can use your language's corresponding keyword when a .NET Framework base data type is expected.

The following table lists some of the value types the .NET Framework supplies, briefly describes each type, and indicates the corresponding type in Visual Basic, C#, and the Managed Extensions for C++. The table also includes entries for the Object and String classes, for which many languages have corresponding keywords.

CategoryClass nameDescriptionVisual Basic data typeC# data typeManaged Extensions for C++ data typeJScript data type
IntegerByteAn 8-bit unsigned integer.BytebytecharByte
   SByteAn 8-bit signed integer.

Not CLS-compliant.

SByte

No built-in type.

sbytesigned charSByte
   Int16A 16-bit signed integer.Shortshortshortshort
   Int32A 32-bit signed integer.Integerintint

-or-

long

int
   Int64A 64-bit signed integer.Longlong__int64long
   UInt16A 16-bit unsigned integer.

Not CLS-compliant.

UInt16

No built-in type.

ushortunsigned shortUInt16
   UInt32A 32-bit unsigned integer.

Not CLS-compliant.

UInt32

No built-in type.

uintunsigned int

-or-

unsigned long

UInt32
   UInt64A 64-bit unsigned integer.

Not CLS-compliant.

UInt64

No built-in type.

ulongunsigned __int64UInt64
Floating pointSingleA single-precision (32-bit) floating-point number.Singlefloatfloatfloat
   DoubleA double-precision (64-bit) floating-point number.Doubledoubledoubledouble
LogicalBooleanA Boolean value (true or false).Booleanboolboolbool
OtherCharA Unicode (16-bit) character.Charcharwchar_tchar
   DecimalA 96-bit decimal value.DecimaldecimalDecimalDecimal
   IntPtrA signed integer whose size depends on the underlying platform (a 32-bit value on a 32-bit platform and a 64-bit value on a 64-bit platform).IntPtr

No built-in type.

IntPtr

No built-in type.

IntPtr

No built-in type.

IntPtr
   UIntPtrAn unsigned integer whose size depends on the underlying platform (a 32- bit value on a 32-bit platform and a 64-bit value on a 64-bit platform).

Not CLS-compliant.

UIntPtr

No built-in type.

UIntPtr

No built-in type.

UIntPtr

No built-in type.

UIntPtr
Class objectsObjectThe root of the object hierarchy.ObjectobjectObject*Object
   StringAn immutable, fixed-length string of Unicode characters.StringstringString*String

In addition to the base data types, the System namespace contains almost 100 classes, ranging from classes that handle exceptions to classes that deal with core runtime concepts, such as application domains and the garbage collector. The System namespace also contains many second-level namespaces.

For more information about namespaces, browse the .NET Framework Reference. The reference documentation provides a brief overview of each namespace as well as a formal description of each type and its members.

See Also

Common Type System | .NET Framework Reference | Inside the .NET Framework

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft