C#
C# is a modern, object-oriented language by Microsoft, powering enterprise applications, games, and cloud services through the .NET ecosystem.
Contents 6 Sections
1C# Fundamentals
C# (pronounced C-sharp) is a statically-typed, object-oriented language developed by Microsoft. It runs on the .NET runtime and is known for its clean syntax and powerful features.
- Core Features:
- Strong typing with type inference
- Object-oriented: classes, inheritance, polymorphism
- Async/await for asynchronous programming
- LINQ (Language Integrated Query) for data manipulation
- Delegates and events for event-driven programming
- Properties and automatic properties for encapsulation
2.NET Ecosystem
C# runs on .NET, which includes frameworks and libraries for building diverse applications.
- .NET Platforms:
- .NET 7+ (cross-platform): desktop, web, cloud
- ASP.NET Core: web applications and APIs
- Entity Framework Core: ORM for data access
- WPF: Windows desktop applications
- Unity: game development
- Blazor: web applications with C#
3Advanced C#
Modern C# includes advanced features for writing clean, maintainable code.
- Features:
- Async/await patterns for non-blocking operations
- LINQ: querying collections, databases, XML
- Extension methods: adding methods to existing types
- Reflection: runtime type inspection
- Generics: type-safe reusable code
- Nullable reference types: null safety
- Records: immutable data types
4Enterprise Applications
C# is widely used for building enterprise systems, web services, and business applications.
- Use Cases:
- Enterprise backend systems (banking, insurance, retail)
- Web APIs with ASP.NET Core
- Cloud applications on Azure
- Desktop applications with WPF or WinForms
- Game development with Unity
- Real-time applications with SignalR
5C# with Code Examples
// Modern C# (10+) features
// Records immutable data types
public record Person(string Name, int Age)
{
// Computed property
public bool IsAdult => Age >= 18;
}var alice = new Person("Alice", 30); var olderAlice = alice with { Age = 31 }; // non-destructive mutation Console.WriteLine(alice == olderAlice); // false
// Pattern matching (C# 9+) static string Describe(object obj) => obj switch { int n when n < 0 => "negative number", int n => $"positive: {n}", string s when s.Length > 10 => "long string", string s => $"short string: {s}", null => "null", _ => "unknown" };
// Async/await
public async Task> GetActiveUsersAsync()
{
await using var conn = new SqlConnection(_connectionString);
var users = await conn.QueryAsync
// LINQ var topProducts = products .Where(p => p.IsActive && p.Stock > 0) .GroupBy(p => p.Category) .Select(g => new { Category = g.Key, Count = g.Count(), AvgPrice = g.Average(p => p.Price) }) .OrderByDescending(x => x.AvgPrice) .Take(5) .ToList(); ```
6ASP.NET Core API
// Minimal API (ASP.NET Core 6+)
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<AppDbContext>(opt =>
opt.UseSqlServer(builder.Configuration.GetConnectionString("Default")));
builder.Services.AddScoped<IUserService, UserService>();var app = builder.Build();
// Route group with auth var users = app.MapGroup("/api/users").RequireAuthorization();
users.MapGet("/", async (IUserService svc) => Results.Ok(await svc.GetAllAsync()));
users.MapGet("/{id:int}", async (int id, IUserService svc) => await svc.GetByIdAsync(id) is User user ? Results.Ok(user) : Results.NotFound());
users.MapPost("/", async (CreateUserDto dto, IUserService svc) => { var user = await svc.CreateAsync(dto); return Results.Created($"/api/users/{user.Id}", user); });
// Minimal controller-style app.Run();
// Entity Framework Core
public class AppDbContext : DbContext
{
public DbSet
protected override void OnModelCreating(ModelBuilder mb)
{
mb.Entity
Explore the Full Portfolio
This is the complete portfolio of Sufi Khan Sulaiman, a technology leader specialising in B2B commerce and digital automation. Start from the Home page for the overview, then move through two decades of career experience across FLIR Systems, Lorex Technology, and 1c Platform, and the full catalogue of project case studies spanning headless commerce migrations, AI recommendation engines, and multi-channel fulfilment systems.
The skills and certifications page maps the technical and leadership capabilities behind the work, while the articles and the knowledge base break down the thinking into actionable frameworks. For hands-on learning, the tutorials and applications sections cover practical builds from front-end fundamentals to full-stack web apps.
For consulting engagement, the expertise page outlines service offerings, the ecommerce hub covers platform architecture and automation strategy, and the ecommerce guide (PDF) is a downloadable 55-page field manual. When you are ready to talk, the contact page is the direct line.