Introduction to C# Last Updated : 08 Oct, 2025 Comments Improve Suggest changes Like Article Like Report C# (C-sharp) is a modern, object-oriented language created by Microsoft in 2000 as part of the .NET framework. It is used to build Windows applications, web services and more. C# combines the power of C/C++ with the simplicity of Java and Visual Basic.Why use C#?Easy to learn: Clear, readable syntax, familiar to Java/C++ developers.Object-Oriented: Supports OOP principles (encapsulation, inheritance, polymorphism).Cross-platform: Build desktop, web, mobile, cloud and game applications.Rich libraries & frameworks: Large .NET library for faster development.Memory management: Automatic garbage collection reduces memory leaks.Modern features: LINQ, async/await and other powerful tools.Applications of C#Windows Applications: Used to build desktop apps with frameworks like WPF and WinForms.Web Applications & Services: Powers dynamic websites, APIs and services using ASP.NET / ASP.NET Core.Game Development: Popular in Unity engine, one of the most widely used game development platforms.Mobile Applications: Supports cross-platform apps with Xamarin and .NET MAUI.Cloud & Enterprise Solutions: Widely used for scalable applications on Microsoft Azure and enterprise software.Basic Program in C# C# using System; namespace HelloGeeksApp{ class HelloGeeks{ static void Main(string[] args){ Console.WriteLine("Hello Geek!"); Console.ReadKey(); } } } OutputHello Geek! ExplanationProgram starts execution from the Main method.Console.WriteLine("Hello Geek!"): prints "Hello Geek!" on the console.Console.ReadKey(): waits for the user to press a key so the console window doesn’t close immediately.Keywordsusing: lets you use classes from a namespace without full names.System: built-in namespace that has basic classes (like Console).namespace: groups related classes together (like a folder).class: defines a class (container for code).HelloGeeks: name of your class.static: method belongs to the class itself, no object needed.void: return type meaning “no value returned”.string[] args: stores command-line arguments (optional input).Frameworks and TechnologiesC# works closely with the .NET ecosystem, which provides the runtime, libraries and tools for application development. Over time, several frameworks and technologies have evolved around C# to support diverse platforms.Frameworks and Technologies in C#1. .NET FrameworkThe original Windows-only platform for building desktop and web applications.Commonly used for WPF, WinForms and ASP.NET applications.2. .NET CoreCross-platform, open-source version of .NET.Used to build apps that run on Windows, Linux and macOS.Supports web APIs, microservices and command-line tools.3. .NET 5 and Later (.NET Unified Platform)Unifies .NET Framework and .NET Core into a single platform.Provides performance improvements and cross-platform support for all application types.4. ASP.NET and ASP.NET CoreFrameworks for developing dynamic web applications, RESTful APIs and MVC-based web services.5. Entity Framework Core (EF Core)Object-Relational Mapper (ORM) for database operations.Allows developers to interact with databases using C# objects instead of SQL queries.6. Unity EngineA game development platform that uses C# scripts for game logic.Powers 2D, 3D, AR and VR games across platforms like PC, consoles and mobile.Advantages of C#Automatic garbage collection: reduces memory leaks and makes memory management easy.Safe and low maintenance: reliable compared to many other languages.Cross-platform via IL: compiled into Intermediate Language, independent of OS/architecture.Easy to learn: clear syntax, familiar to Java/C++ programmers.Rich standard library: many built-in classes and features.Strongly typed: reduces errors and improves reliability.Related ArticlesC# TutorialLearn C# Programming Comment GeeksforGeeks Improve GeeksforGeeks Improve Article Tags : Misc C# CSharp-Basics Explore IntroductionC# Tutorial 2 min read Introduction to .NET Framework 6 min read C# .NET Framework (Basic Architecture and Component Stack) 6 min read C# Hello World 2 min read Common Language Runtime (CLR) in C# 4 min read FundamentalsC# Identifiers 2 min read Data Types in C# 6 min read C# Variables 4 min read C# Literals 5 min read Operators in C# 7 min read C# Keywords 5 min read Control StatementsC# Decision Making (if, if-else, if-else-if ladder, nested if, switch, nested switch) 5 min read C# Switch Statement 4 min read Loops in C# 4 min read C# Jump Statements (Break, Continue, Goto, Return and Throw) 4 min read OOP ConceptsClass and Objects in C# 4 min read Constructors in C# 5 min read C# Inheritance 3 min read Encapsulation in C# 2 min read C# Abstraction 4 min read MethodsMethods in C# 4 min read Method Overloading in C# 4 min read C# | Method Parameters 7 min read Method Overriding in C# 7 min read Anonymous Method in C# 2 min read ArraysArrays in C# 6 min read Jagged Arrays in C# 4 min read Array Class in C# 5 min read How to Sort an Array in C# | Array.Sort() Method Set - 1 8 min read How to find the rank of an array in C# 2 min read ArrayListArrayList in C# 6 min read C# ArrayList Class 7 min read C# | Array vs ArrayList 2 min read StringStrings in C# 6 min read C# Verbatim String Literal - @ 5 min read C# String Class 9 min read C# StringBuilder 4 min read C# String vs StringBuilder 3 min read TupleC# Tuple 7 min read C# Tuple Class 3 min read C# ValueTuple 7 min read C# ValueTuple Struct 4 min read IndexersC# Indexers 4 min read C# Multidimensional Indexers 5 min read C# - Overloading of Indexers 3 min read Like