Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 2.26 KB

File metadata and controls

67 lines (52 loc) · 2.26 KB

📝 Code Snippets

This directory contains focused, educational code snippets that demonstrate specific C# concepts. Each snippet is designed to teach a single concept clearly and concisely.

📂 Organization

01-Beginner

Fundamental C# concepts for newcomers:

  • CastingExamples - Type casting and conversion
  • OverrideVirtual - Method overriding and polymorphism basics
  • PolymorphismBasics - Introduction to polymorphic behavior

02-Intermediate

Intermediate-level concepts:

  • BoxingPerformance - Boxing/unboxing and performance implications
  • CovarianceContravariance - Generic variance in C#
  • GenericConstraints - Working with generic type constraints

03-Advanced

Advanced programming patterns:

  • DesignPatterns - Common software design patterns
  • HighPerformance - Performance optimization techniques
  • ObservabilityPatterns - Logging, metrics, and tracing
  • PerformanceOptimization - Advanced optimization strategies
  • ResiliencePatterns - Fault tolerance and resilience
  • SOLIDPrinciples - SOLID design principles in practice

04-Expert

Expert-level features:

  • AdvancedPerformance - Expert performance optimization
  • NativeAOT - Ahead-of-time compilation
  • RoslynAnalyzersDemo - Custom code analyzers
  • SourceGenerators - Source generation techniques

99-Exercises

Interactive learning exercises:

  • Algorithms - Algorithm practice
  • DesignPatterns - Pattern implementation exercises
  • Generics - Generic programming exercises
  • LINQ - Language Integrated Query exercises

🎯 How to Use

Each snippet is self-contained and can be run independently:

# Navigate to a snippet
cd snippets/01-Beginner/PolymorphismBasics

# Build and run
dotnet build
dotnet run

📚 Learning Path

  1. Start with 01-Beginner for fundamentals
  2. Progress to 02-Intermediate for deeper concepts
  3. Study 03-Advanced for production patterns
  4. Master 04-Expert for advanced features
  5. Practice with 99-Exercises to reinforce learning

🔗 See Also