Basic of C#
Basic of C#
What is C#?
It is an object-oriented programming language created by Microsoft that is runs on the .NET framework.
- C# has roots from the C family, and the language is close to the other popular language like C++, JAVA
- The first Version was released in year 2002. The latest version C# was released in November 2021.
C# is Used for
- Mobile application
- Desktop application
- Web application
- Web services
- Websites
- games
- VR
- Database application
Why Use C#
- It is one of the most popular programming language in the world.
- It is easy to learn and simple to use
- It has huge community support
- C# is an object oriented language which gives a clear structure to programs and allow code to reused , lowering development cost
- As C# is close to C, C++, and JAVA. It makes it easy to programmer's to switch to C# or vice-versa
C# Comments
Single line comments start with two forward slash (//)
Any text between // and the end of the line is ignored by C# C will not be executed.
Multiline comments starts with /* and ends with */
C# Variables
Variables are containers for storing data values. In C# there are different types of variables (defined with different key words) for ex- int, double , char, string , bool
C# Operators
- Addition
- Subtraction
- Multiplication
- Modulus
- Increment
- Decrement
- Assignment
- Comparison operator ( Equal operator , Not equal operator (!=) , Greater than , Less than , greater than equal to, less than equal to)
- Logical operator ( And logical (&) , Logical OR (||) , Logical NOT (!)
C# Loop :
Loops can be execute a block of code as long as specified condition is reached
- for loop
- while loop
- do/while loop
Comments
Post a Comment