C# guides
Every published C# guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular C# guides
Most readLatest C# guides
Page 56 of 77C# Static Method: Syntax, Behavior, and Tradeoffs
Understand C# static methods: declaration syntax, calling conventions, thread-safety implications, and when instance methods are a better design.
C# Static Variable: Lifetime and Thread Safety
Learn how static variables work in C#: declaration, initialization, lifetime, thread safety, and common pitfalls for shared state.
C# Static Keyword: Class-Level Members Explained
c# static keyword: Understand the C# static keyword: how static members behave, when to use them, and common pitfalls in class design and multithreading.
C# Init Property: Immutable Object Initialization
Learn how C# init-only properties allow object initializer syntax while preventing assignment after construction, and how they compare with set accessors and readonly fields.
C# Required Property: Enforcing Initialization
Learn how the C# required modifier enforces property initialization at compile time, including object initializers, constructors, SetsRequiredMembers, and serialization considerations.
C# Property Validation: Choosing the Right Approach
Compare DataAnnotations, IValidatableObject, custom attributes, and setter checks to decide where C# property validation belongs in your application.
C# Full Property: Syntax and When to Use It
c# full property: Understand the C# full property syntax, its backing field, and when to use it over auto-implemented properties for validation, computed values, and t...
c# property default value: Setting Initial Values Correctly
c# property default value: Learn how to set default values for C# properties using initializers, constructors, and backing fields, and understand the runtime behavior...
C# Expression-Bodied Property: Syntax and Usage
C# expression-bodied properties let you define a getter as one expression. See the syntax, examples, common pitfalls, and when a traditional getter is a better choice.
C# Get Only Property: Syntax and Usage
c# get only property: Learn how to define get-only properties in C#, assign values in constructors, use auto-property initializers, and understand the differences from...