C# is a modern, object-oriented programming language developed by Microsoft.
Initially developed in .NET framework.
C# is used to develop vast range of applications like mobile apps, web apps, games, etc...
History
Created by Anders Hejlsberg and his team at Microsoft.
C# is introduced by microsoft in 2000
Developed to address the limitations of existing programming languages and better use.
Applications
C# language is used in many fields such as in
desktop applications
web applications
mobile applications
Game development
C# Structure
Example
#include <stdio.h>
int main() {
printf("Welcome to C Tutorial");
return 0;
}
using System; - Uses Namespace which contains fundamental classes and base types that are essential for most C# programs. class Hello - Defines a Class. printf("Welcome to C Tutorial"); - Contains Main Method. The code inside it is executed. Console.WriteLine("Hello, World"); - Prints the output in Console
Note: Always keep semicolon " ; " at the end of each line.
Environment Setup
Install C# IDE on your PC and start running your own code.
Here are some applications and software used to install IDE
After deploying C# in your pc, create a new file with .cs extension and start your C# program.
Quick Recap - Topics Covered
Introduction and history of C
C is a general-purpose programming language developed by Dennis Ritchie.
Developed by Dennis Ritchie in early 1970s.
C introduced several features that made it more powerful and versatile language.
#include - It's an header file, which has all the necessary information to include the input/output related functions in our program.
Example: printf, scanf etc.
int main() - The main function is the starting point of program execution. We can declared it with integer or void.
printf("Welcome to C Tutorial"); - Prints the value iven in the printf() function.
return 0; - The calling function will expect an integer value from the main function as it is declared the function main() with integer.
The Concepts and codes you leart practice in Compilers till you are confident of doing on your own. A Various methods of examples, concepts, codes availble in our websites. Don't know where to start Down some code examples are given for this page topic use the code and compiler.