History

- **How**:
	- Developed by **Anders Hejlsberg** and his team at **Microsoft** in the early 2000s.
	- Designed as a modern, object-oriented language that combines the power of C++ with the ease of use of languages like Java.
	- Part of the **.NET Framework**, C# was intended to be a language for building a wide variety of applications, from desktop software to web applications and games.
	- Evolved through versions, with notable milestones such as C# 2.0 (introducing generics), C# 3.0 (LINQ), and C# 5.0 (asynchronous programming with async/await).
	-
- **Who**:
	- **Anders Hejlsberg**, a Danish software engineer, known for creating C# and also the architect behind Turbo Pascal and Delphi.
	- **Microsoft**, the company that developed and maintains the C# language and the .NET Framework.
-
- **Why**:
	- To create a safe, modern language that could address the challenges of developing applications on Windows, while being part of the .NET ecosystem.
	- To combine the power of low-level languages with the simplicity and safety of modern programming paradigms like object-oriented programming.
	- To provide a language that would be suited for building Windows applications, web services, and enterprise-level systems while being cross-platform with the introduction of .NET Core.

-

  • introduction

    • Advantages:

      • Object-Oriented: Supports inheritance, polymorphism, and encapsulation, ideal for large applications.
      • Rich Ecosystem: Access to the .NET framework, offering libraries for GUI, web, and database development.
      • Cross-Platform: With .NET Core, C# works on Windows, Linux, macOS.
      • Garbage Collection: Automatic memory management reduces the risk of memory leaks.
      • Integration with Microsoft: Works seamlessly with Azure, SQL Server, and other Microsoft technologies.
    • Disadvantages:

      • Memory Heavy: May use more memory compared to low-level languages like C.
      • Performance: Slower than languages like C/C++ due to its managed nature.
      • Learning Curve: Requires understanding of concepts like asynchronous programming and LINQ.
      • Dependency on .NET: Still tied to the .NET ecosystem, which might limit flexibility.
    • Remember Points:

      • Asynchronous Programming: C# supports asynchronous programming with async and await keywords.
      • Modern Language Features: Includes LINQ, nullable types, and pattern matching, improving productivity.
  • Notes

    • Main() is the entry point of a C# program.
    • Console.WriteLine("Hello World"); is used for printing output.
    • Variables

      • C# Strings

        • String concatenation

          collapsed:: true
        • String interpolation

          collapsed:: true
        • Verbatim strings

          collapsed:: true
        • Member Example

          collapsed:: true
        • String Members

          collapsed:: true
    • Primitive Data Types

    • User Input

    • Comments

    • Conditionals

    • Arrays

    • Loops

  • Library & Frameworks

  • More Learn