Monday 4 February 2013

C#.Net

C#(pronounced "C sharp") is a programming language that is designed for building a variety of applications that run on the .Net Framework. C# is simple, powerful, type-safe and object-oriented. The .Net Framework class libraries provides access to many operating system services and other useful, well-designed classes that speed up the development cycle significantly. It was developed by Microsoft as part of the .Net initiative and later approved as a standard by ECMA(ECMA-334) and ISO(ISO/IEC 23270)

Design Goals
  • C# language is intended to be a simple, modern, general-purpose, object-orinted programming language.
  • The language, and implementation thereof, should provide support for software engineering principles such as strong type checking, array bounds checking, detection of attempts to use uninitialized variables, and automatic productivity are important.
  • The language is intended for use in developing software components suitable for deployment in distributed environments.
  • Source code copmatability is very important, as is programmer productivity, especially for those programmers already familiar with C and C++.
  • Support for internationalization is very inportant.
  • C# is intended to be suitable for writing applications for both hosted and embedded systems, ranging from the very large that use sophisticated operating systems, down to the very small having dedicated functions. 
C# 2.0 New  Features              C# 3.0 New Features                    C# 4.0 New Features
                                                                                                                                      1.Generics                                1.Implicitly typed local variables.       1.Dynamic bindings.
2.Partial types                           2.Object and collection Initializers.    2.Named and optional arguments.
3.Anonymous methods              3.Auto-Implemented                        3.Generic co-variance and
4.Iterators                                       properties.                                         contra variations.
5.Nullable Types                       4.Anonymous types.
6.Private setters                        5.Extension Methods.
    (properties)                           6.Lambda expressions.
7.Method group                        7.Query expressions.
   conversations(delegates)         8.Expression trees

 C# Features
  • There are no global variables or functions. All methods and menbers must be declared within classes.
  • Local variables cannot shadow variables of the enclosing block, unlike C and C++, C#  supports a strict boolean data tpye, bool.
  • In c# memory adress ponters can only be used within blok specially marked as unsafe, and programs with unsafe code need appropriate permissions to run.
  • c# is more typesafe than C++.
  • C# provides syntactic sugar for a common pattern of a pair of methods, accessor and mutator encapsulating operations on a single of a class, in form of properties.
  • Full type reflection and discovery is available.
C# Advantages
  • C# borrows concepts from Java and C++, adopting only the good bits from those languages and eliminating overly confusing and error prone features, which are the major sources of bug in a code.
  • C# is a terse language.Its very tiny even with the commands.
  • C# supports effective and reusable componets.
  • C# can programs can be written in as simple as a textpad and a command line which are common to any  operating system provided the developer has installed the CLR and the Framework prior.
  • C# provides the ability of code extension to the developers can produce extensions and wrappers to use the  underlying library to behave the way developer want it to.
C# Disadvantages
  • C# progrmas are largely for Microsoft Windows Environment which although happens to be the post widely used Operating system over te globe, but with open source  technologies, especially platforms like Linux cathing up, C# still has to long way to go. This is one major shortcoming of C#.
  • C# has eliminatwd the"unsafe" code funtionalities from C++; it has its own set of functionalities which are to be used with caution by the user.
  • Although C# programs can be written as little as a text editor and compiled using command line, it still needs the .Net Framework to be present on the system , which cripples down the portability in the development of C# programs by a large amount,  and makes it more Microsoft Windows dependent.









No comments:

Post a Comment