Features of C#

Rumman Ansari   Software Engineer   2023-03-30   7311 Share
☰ Table of Contents

Table of Content:


For lazy Readers :)

C# is object oriented programming language. It provides a lot of features that are given below.

  1. Simple
  2. Modern programming language
  3. Object oriented
  4. Type safe
  5. Interoperability
  6. Scalable and Updateable
  7. Component oriented
  8. Structured programming language
  9. Rich Library
  10. Fast speed

1. Simple

C# is a simple language in the sense that it provides structured approach (to break the problem into parts), rich set of library functions, data types etc.

2. Modern Programming Language

C# programming is based upon the current trend and it is very powerful and simple for building scalable, interoperable and robust applications.

3. Object Oriented

C# is object oriented programming language. OOPs makes development and maintenance easier where as in Procedure-oriented programming language it is not easy to manage if code grows as project size grow.

4. Type Safe

C# type safe code can only access the memory location that it has permission to execute. Therefore it improves a security of the program.

5. Interoperability

Interoperability process enables the C# programs to do almost anything that a native C++ application can do.

6. Scalable and Updateable

C# is automatic scalable and updateable programming language. For updating our application we delete the old files and update them with new ones.

7. Component Oriented

C# is component oriented programming language. It is the predominant software development methodology used to develop more robust and highly scalable applications.

8. Structured Programming Language

C# is a structured programming language in the sense that we can break the program into parts using functions. So, it is easy to understand and modify.

9. Rich Library

C# provides a lot of inbuilt functions that makes the development fast.

10. Fast Speed

The compilation and execution time of C# language is fast.

Learn from Easy Points

  1. C# is a simple, modern, object oriented language derived from C++ and Java.
  2. It aims to combine the high productivity of Visual Basic and the raw power of C++.
  3. It is a part of Microsoft Visual Studio 7.0.
  4. Visual Studio supports VB, VC++, C++, VBscript, JScript. All of these languages provide access to the Microsft .NET platform.
  5. .NET includes a Common Execution engine and a rich class library.
  6. Microsofts JVM eqiv is Common language run time(CLR).
  7. CLR accommadates more than one languages such as C#, VB.NET, Jscript, ASP.NET,C ++.
  8. Source code --->Intermediate Language code(IL) ---> (JIT Compiler) Native code.
  9. The classes and data types are common to all of the .NET languages.
  10. We may develop Console application, Windows application, and Web application using C#.
  11. In C#, Microsoft has taken care of C++ problems, such as Memory management, pointers etc.
  12. It supports garbage collection, automatic memory management, and a lot.

MAIN FEATURES OF C#

1. SIMPLE

  1. Pointers are missing in C#.
  2. Unsafe operations such as direct memory manipulation are not allowed.
  3. In C# there is  no usage of "::" or "->" operators.
  4. Since it's on .NET, it inherits the features of automatic memory management and garbage collection.
  5. Varying ranges of the primitive types like Integer,Floats etc.
  6. Integer values  of 0 and 1 are no longer accepted as boolean values.Boolean values are pure true or false values in C# so no more errors of "="operator and "=="operator.
  7. "==" is used for comparison operation and "=" is used for assignment operation.

2. MODERN

 

  • C# has been based according to the current trend and is very powerful and simple for building interoperable, scable, robust applications.

 

  1. C# includes built in support to turn any component into a web service that can be invoked over the internet from any application running on any platform.

3. OBJECT ORIENTED

  1. C# supports Data Encapsulation, inheritance,polymorphism, interfaces.
  2. (int,float, double) are not objects in java but C# has introduces structures(structs) which enable the primitive types to become objects.

    int i=1;
    string a=i Tostring(); //conversion (or) Boxing

4. TYPE SAFE

 

  • In C# we cannot perform unsafe casts like convert double to a boolean.
  • Value types (priitive types) are initialized to zeros and reference types (objects and classes) are initialized to null by the compiler automatically.
  • arrays are zero base indexed and are bound checked.

 

  1. Overflow of types can be checked.

5. INTEROPERABILITY

  1. C# includes native support for the COM and windows based applications.
  2. Allowing restriced use of native pointers.
  3. Users no longer have to explicityly implement the unknown and other COM interfacers, those features are built in.
  4. C# allows the users to use pointers as unsafe code blocks to manipulate your old code.
  5. Components from VB NET and other managed code languages and directlyt be used in C#.

6. SCALABLE AND UPDATEABLE

 

  • .NET has introduced assemblies which are self describing by means of their manifest. manifest establishes the assembly identity, version, culture and digital signature etc. Assemblies need not to be register anywhere.
  • To scale our application we delete the old files and updating them with new ones. No registering of dynamic linking library.

 

  1. Updating software components is an error prone task. Revisions made to the code. can effect the existing program C# support versioning in the language. Native support for interfaces and method overriding enable complex frame works to be developed and evolved over time.

CONCLUSION

C# is a modern, type safe programming language, object oriented language that enables programmers to quickly and easily build solutions for the Microsoft .NET platform.