Thursday 6 July 2017

c sharp lesson-6




The programming c# is derived from c and c++.
It is a modern programming language.It simplifies and modernise the concepts in c++ like method overloading, classes, namespaces and exception handling.complexity concepts in c++ have beed removed from c#.
For example multiple inheritance has been removed in c#..At the same time new features like type safety,versioning,garbage collectors have been added in c#.

Simple:

C# is a simple language. Pointers concepts is not available in c#.Unsafe operations like direct memory manipulation have been removed.converting from value type variable into object and the object convert in to valuetype is available in c#. this concept is called boxing and unboxing. Data types like integer and boolean are separate datatypes in c#.

Modern

Decimal data type which take memory upto 16 bytes have been added ijn c#. in c# you don’t haveto write coding for cleaning the memory used by objects. In c# there uis a mechanism called as garbage collector is available now. It will run when ever objects goes out of use and cleans the memory used by objects.

Object-oriented.

C# suppotrs all the major concepts of object oriented programming like encapsulation, abstraction, inheriance and polymorphism. There are no global functions,variables and constants. The methods defined on classes are non-virtual by default. That means they can not be over ridden in derived classes.c# supports the private,public,protected and internal  access modifiers. C# provides a new concept called delegates similar to function pointer in c#.

Type-safe

Uninitialized variables can not be used .the compiler take care of member variables to zeroing them. Programmer has the responsibity for local variables.c# provides check for bounds of an array for example you can not write a array with size of five and access  the sixth element of that array.reference parameters are tyope safe.

Versionable

Multiple applications installl different versions of the same DLL to the computer.As a result some times the application workds and sometimes not working.c# provides with the concept of versioning through which developers can retain the binary compatibility of applications with the existing client applications.
.
Flexible.

Although c# doesn’t support pointers  we can use pointers by declaring them as unsafe code. This provides the flexibity to c language
                  -Muthu karthikeyan,Madurai
Contact:
919629329142




No comments:

Post a Comment