alert('Oh shit !!!! Javascript is disabled!!!! ');


Blog Archive

Introduction to C# Blog

C# Tutorials
What is C#?
C# is intended to be a simple, modern, general-purpose, object-oriented programming language. Its development team is led by Anders Hejlsberg. The most recent version is C# 4.0, which was released on April 12, 2010. C# (pronounced "see sharp") is a multi-paradigm programming language encompassing imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed by Microsoft within the .NET initiative and later approved as a standard by Ecma (ECMA-334) and ISO (ISO/IEC 23270). C# is one of the programming languages designed for the Common Language Infrastructure.
Features of C#
Some notable distinguishing features of C# are:
  • There are no global variables or functions. All methods and members must be declared within classes. Static members of public classes can substitute for global variables and functions.
  • Managed memory cannot be explicitly freed instead, it is automatically garbage collected.
  • Garbage collection addresses the problem of memory leaks by freeing the programmer of responsibility for releasing memory which is no longer needed.
  • In addition to the try...catch construct to handle exceptions, C# has a try...finally construct to guarantee execution of the code in the finally block.
  • Multiple inheritance  is not supported by C#, although a class can implement any number of interfaces.
C# and .Net Framework
   Microsoft announced C# in July 2000, its unveiling was part of a much larger event the announcement of the .NET Framework. The .NET Framework is, in essence, a new development framework that provides a fresh application programming interface (API) to the services and APIs of classic Windows operating systems (especially the Windows 2000 family), while bringing together a number of disparate technologies that emerged from Microsoft during the late 1990s. Among the latter are COM+ component services, the ASP web development framework, a commitment to XML and object-oriented design, support for new web services protocols such as SOAP, WSDL, and UDDI, and a focus on the Internet Information Services.
What is CLR?  
CLR (Common Language Runtime) is the most important component of .Net Framework. It manages and executes code written in .Net Languages, CLR activates objects and perform security checks. The CLR allows programmers to ignore many details of the specific CPU that will execute the program. It also provides other important services, including the following:   
  • Memory management  
  • Thread management  
  • Exception handling  
  • Garbage collection
  • Security   Central to the .NET Framework is its runtime execution environment, known as the Common Language
Runtime (CLR) or the .NET runtime. Code running under the control of the CLR is often termed as managed code.
What is CTS?  
In .NET Framework, the Common Type System (CTS) is a standard that specifies how Type  definitions and specific values of Types are represented in computer memory. It is intended to allow programs written
in different programming languages to easily share information.  Functions of the Common Type System:-

  • CTS establishes a framework that helps enable cross-language integration, type safety, and high performance code execution.
  • CTS provides an object-oriented model that supports the complete implementation of many programming languages.
  • CTS also defines rules that languages must follow, which helps ensure that  objects written in different languages can interact with each other.
  • Languages supported by .NET can implement all or some common data types.
Type categories the common type system supports two general categories of types:
Value types:    Value types directly contain their data, and instances of value types are either allocated on the stack or allocated inline in a structure. Value types can be built-in (implemented by the runtime), user-defined, or enumerations.
Reference types:    Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. The type of a reference type can be determined from values of self-describing types. Self-describing types are further split into arrays and class types. The class types are user-defined classes, boxed value types, and delegates.
What is CLS?
The Common Language Specification (CLS) is a part of the standardized specification of the .NET Framework originally defined by Microsoft, and later standardized by the European Computer Manufacturers Association  (ECMA). A key feature of .NET Framework is that applications written in different languages can interoperate with one another, taking advantage of inheritance, polymorphism, exceptions and other features.       CLS provides, set of specification to be adhered by new language writer/compiler writer for .Net Framework to ensure interoperability. because .net supports many languages.For example Asp.Net application written in C#.Net language. Now we can refer any other DLL which has been written in any other language supported by .Net Frame Work.