Jump to content

User:Manishgautam099

From Wikipedia, the free encyclopedia

C Sharp (programming language) It is an object-oriented programming language developed by Microsoft as part of the .NET initiative and later approved as a standard by ECMA and ISO. Anders Hejlsberg leads development of the language, which has procedural, object-oriented syntax based on C++ and includes influences from several other programming languages most importantly Delphi and Java with a particular emphasis on simplification.


History of the language During the development of .NET, the class libraries were originally written in a language called Simple Managed C (SMC), later the language had been renamed C# and the class libraries as well as ASP.NET runtime had been ported to C#. C#'s principal designer and lead architect Anders Hejlsberg, has previously involved with the design of Visual J++, Borland Delphi, and Turbo Pascal languages. In interviews and technical papers he has stated that flaws in most major programming languages like C++, Java, Delphi, and Smalltalk drove the design of C# programming language. Design goals of C#: The ECMA standard lists these design goals for C#: • It is intended to be a simple, modern, general-purpose & object-oriented programming language. • The language should include strong type checking, array bounds checking, detection of attempts to use uninitialized variables, source code portability, and automatic memory management. • The language is intended for use in developing software components that can take advantage of distributed environments. • Programmer portability is very important, especially for those programmers already familiar with C and C++. • Support for internationalization is very important. • C# is intended to be suitable for writing applications both to hosted and embedded systems. Versions of C# Language: 1.0, 1.5, 2.0, 3.0, 4.0

Features of C# 2.0 • Partial classes. • Generics or parameterized types. • Static classes. • Anonymous delegates. • The accessibility of property accessors can be set independently. • Nullable value types. • Coalesce operator (??) that returns the first of its operands which is not null or null, if no such operand exists.


Features of C# 3.0 • Language Integrated Query. • Object initializers & Collection initializers. • Anonymous types. • Implicitly-typed arrays. • Lambda expressions. • Automatic properties. • Extension methods • Partial methods. Features of C# 4.0 • Dynamic programming & Lookups. • Named and optional parameters. • Covariance and Contra-variance. • Indexed properties. • Com specific interop features.