The .NET Universe
What .NET is:

•        A robust development and runtime environment.
•        An improvement and replacement for COM.
•        A platform for building fast web and desktop applications.
•        Programming language agnostic.
•        A set of specifications submitted to ECMA to allow ports to non-Windows operating systems.
•        A runtime that provides memory management and type verification.

What .NET is not:
•        Not just about the web or web services.
•        Not confined to the Windows operating system.
•        Not an operating system itself.






















The .NET runtime runs on top of the underlying operating system.  Vista ships with the .NET runtime
preinstalled.  Other Windows OSs can be configured using the freely downloadable .NET runtime installer
(dotnetfx.exe- the exact name of the executable will be based on which version you are installing).  Other OSs
(Mac, Linux, Solaris, etc) require installation of an ECMA-compliant .NET distribution (again, more
information at the end of this chapter).

Here are a few key .NET components (each will be detailed later):

  • Common Type System (CTS): A standard for type definitions and functionality that .NET languages
    can support.
  • Common Language Specification (CLS): A subset of the CTS that all .NET languages must support.
  • Common Language Runtime (CLR): A library of utility classes for building desktop, web, or any
    type of application, as well as a runtime for executing .NET code with garbage collection and type
    verification.
  • Common Intermediate Language (CIL): All .NET languages compile to this platform-independent
    language.
  • Assemblies: A new name and structure for EXE and DLL files.

The Role of the Common Type System (CTS):
The Common Type System (CTS) is a formal specification describing how types must be defined to work in
the .NET world.  The CTS solves many language-interoperability issues.  All .NET languages share the same
intrinsic data types.  Any  .NET language is free to define its own corresponding keywords for each intrinsic
type.  Although each language will have its own syntactic representation of a given type, each aliases the same
type in the CTS.  Some exceptions exist. For example, languages may vary on their support for unsigned types.  
Therefore, do not use unsigned types if you wish to achieve full interop!

Here is a summary of VB, C#, and C++ / CLI support for the CTS:

.NET Base Type        VB
    System.Byte           Byte
    System.SByte         SByte
    System.Int16          Short
    System.Int32          Integer
    System.Int64          Long
    System.Uint16       UShort
    System.Uint32       UInteger
    System.Uint64       ULong
    System.Single         Single
    System.Double       Double
    System.Object        Object
    System.Char           Char
    System.String         String
    System.Decimal     Decimal
    System.Boolean     Boolean


.NET Base Type        C#
    System.Byte          byte
    System.SByte        sbyte
    System.Int16         short
    System.Int32         int
    System.Int64         long
    System.Uint16       ushort
    System.Uint32       uint
    System.Uint64       ulong
    System.Single         float
    System.Double       double
    System.Object        object
    System.Char           char
    System.String         string
    System.Decimal     decimal
    System.Boolean      bool

.
NET ET Base Type        C++/CLI
    System.Byte          char
    System.SByte        signed char
    System.Int16         short
    System.Int32         int or long
    System.Int64        __int64
    System.Uint16       unsigned short
    System.Uint32       unsigned int or unsigned long
    System.Uint64       unsigned __int64
    System.Single         float
    System.Double       double
    System.Object        Object
    System.Char          __wchar_t
    System.String         String
    System.Decimal     Decimal
    System.Boolean      bool
C# Tutorial
Table of Contents
C# Tutorial | C#.NET Tutorial | .NET Tutorial

Copyright (c) 2008.  Intertech, Inc. All Rights Reserved.  This information is to be used
exclusively as an online learning aid.  Any attempts to copy, reproduce, or use for training is
strictly prohibited.
Courseware
Training Resources
Tutorials
Services