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 62 of 77C# Method Overloading: Syntax, Rules, and Practical Use
Learn how C# method overloading works: signature rules, compiler resolution, common mistakes, and when generics or optional parameters fit better.
C# ref vs in vs out: Choosing the Right Parameter Modifier
Understand the differences between C# ref, in, and out parameter modifiers, when to use each, and how they affect performance and code clarity.
C# in Parameter: Read-Only References for Structs
Learn how the C# in parameter passes structs by read-only reference, avoids copying for large values, and affects overload resolution and performance.
C# Out Parameter: How to Use It Correctly
c# out parameter: Learn how to use C# out parameters: syntax, initialization rules, common patterns like TryParse, and when to prefer out over ref or return values.
C# ref Parameter: How It Works and When to Use It
Understand how C# ref parameters work, when to use them, and how they differ from out and in parameters in practical code.
Using the C# params Keyword for Variable Arguments
Understand the C# params keyword: syntax, compiler behavior, overload resolution, allocation costs, edge cases, and when an explicit array parameter is a better choice.
C# Named Arguments: Syntax and Usage
Learn how to use C# named arguments, including syntax, placement rules, optional parameters, and readability tradeoffs.
C# Optional Parameters: Syntax, Behavior, and Pitfalls
c# optional parameters: Learn how C# optional parameters work, including default value rules, named arguments, and pitfalls like ambiguous calls.
Using C# Default Parameters Safely
C# default parameters are compiled into callers, so updating a public default may not affect existing consumers. See how optional arguments, named arguments, interfaces, overloads, and API design interact.
C# Argument vs Parameter: What's the Difference?
Parameters are declared in a method signature; arguments are values passed at the call site. Learn the difference in C#, including ref, out, and in passing modes.