What is c# ?

This tutorial will introduce you to .NET framework using C# language. You will also learn to create a C Sharp based web application using .NET framework. This is a complete online course and covers topics like Introduction,first example, objects and classes,Variable and Data Types.

C# is an object-oriented programming language provided by Microsoft that runs on .Net Framework. And it was developed by Anders Hejlsberg and his team during the development of .Net Framework.

It can be used to create console applications, Windows applications, Mobile applications, etc.

It has evolved much since their first release in the year 2002.

Note :-

C# is fully OOP but is not PURELY OOP.

First, its fully OOP because everything are objects. C# does not differentiate between primitive types and object types like in Java. Hence, int is an object, not a primitive type. Second, its not purely OOP because it has features that rightly belong to procedural languages such as function pointers.

A C# program consists of the following parts -

  • Namespace declaration
  • A class
  • Class attributes
  • Class methods
  • A Main method
  • Statements and Expressions
  • Comments

What is c#


Namespaces : They are logical grouping of code (classes/interfaces) that can help in Deployment and package loading (Class loading).

Classes : It can be introduced as a collection of functions and generally contain multiple methods. Methods define the behavior of the class.

static : It is a keyword which means object is not required to access static members. So it saves memory.

void : It is the return type of the method. It doest return any value. In such case, return statement is not required.

Main : It is the method name. It is the entry point for any C# program. Whenever we run the C# program, Main() method is invoked first before any other method. It represents start up of the program.

Compile and Run C# Program:

In order to see the output of the above C# program, we have to compile it and run it by pressing Ctrl + F5, or clicking Run button or by clicking the "Debug" menu and clicking "Start Without Debugging".

For References :-

I hope you enjoyed this article.

Sharing is caring


About Author

Akash is a co-founder and an aspiring entrepreneur who keeps a close eye on open source, tech giants, and security. Get in touch with him by sending an email (akashchugh1994@gmail.com).

You may also like :-

Leave a Comment

Your email address will not be published. Required fields are marked *

Stay Connected

Popular Posts

Get Latest Stuff Through Email

Who Should Read TechTrick?

All the tricks and tips that TechTrick provides only for educational purpose. If you choose to use the information in TechTrick to break into computer systems maliciously and without authorization, you are on your own. Neither I (TechTrick Admin) nor anyone else associated with TechTrick shall be liable. We are not responsibe for any issues that caused due to informations provided here. So, Try yourself and see the results. You are not losing anything by trying... We are humans, Mistakes are quite natural. Here on TechTrick also have many mistakes..