Skip to content

A repository with C# and DotNet documentation to learn best practices.

Notifications You must be signed in to change notification settings

MartinMikes/learn-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Learn .NET

A comprehensive repository with C# and .NET documentation covering the latest features, best practices, and common patterns. This repository is organized to help you learn .NET 10 and C# 14 from fundamentals to advanced topics.

📚 Documentation Structure

Latest C# 14 language features with best practices and examples:

Platform improvements and new capabilities:

  • Runtime Improvements - Performance and JIT enhancements
  • ASP.NET Core 10 - Web development updates
  • Performance Optimizations
  • Entity Framework Core 10
  • MAUI Updates
  • Libraries and APIs

Core C# language concepts and patterns:

  • Basic Types and Variables - Fundamental types and usage
  • Async/Await - Asynchronous programming
  • Control Flow
  • Methods and Functions
  • Object-Oriented Programming
  • Generics
  • LINQ
  • Pattern Matching
  • And much more...

Coding guidelines and design patterns (coming soon)

🎯 Learning Paths

Beginner Path

  1. Start with Basic Types
  2. Learn about Classes and Objects
  3. Understand Control Flow
  4. Explore Methods and Functions
  5. Practice with simple projects

Intermediate Path

  1. Master Async/Await
  2. Learn LINQ
  3. Understand Generics
  4. Explore Collection Expressions
  5. Study ASP.NET Core

Advanced Path

  1. Master Primary Constructors
  2. Understand Inline Arrays
  3. Learn Ref Readonly
  4. Explore Runtime Improvements
  5. Performance optimization techniques

📖 Documentation Philosophy

Each topic includes:

  • Clear Description: What the feature is and why it exists
  • ✅ Best Practice Examples: Production-ready code samples
  • ❌ Common Bad Practices: What to avoid with warnings
  • Performance Considerations: When applicable
  • Related Topics: Links to connected concepts

🚀 Quick Start

Prerequisites

Example: Using Collection Expressions

// Old way
var numbers = new int[] { 1, 2, 3, 4, 5 };

// C# 14 way
int[] numbers = [1, 2, 3, 4, 5];

// Spread operator
int[] moreNumbers = [..numbers, 6, 7, 8];

Example: Primary Constructors

// Concise dependency injection
public class UserService(IUserRepository repository, ILogger<UserService> logger)
{
    public async Task<User> GetUserAsync(int id)
    {
        logger.LogInformation("Fetching user {UserId}", id);
        return await repository.GetByIdAsync(id);
    }
}

🤝 Contributing

This is a learning resource. If you find errors or have suggestions for improvement, please feel free to contribute!

📝 License

This documentation is provided as-is for educational purposes.

🔗 Additional Resources

📊 Repository Stats

  • C# 14 Features: 8 comprehensive guides
  • C# Fundamentals: Growing collection
  • Code Examples: Best practices with anti-patterns
  • Coverage: Latest .NET 10 and C# 14 features

Happy Learning! 🎓

About

A repository with C# and DotNet documentation to learn best practices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •