All syntax guides
Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.
3,965 guides across 14 topics
Topics
Popular guides
Most readLatest guides
Page 381 of 397C# 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.
C# Method Parameters: ref, out, in, params
Understand C# method parameter modifiers: value parameters, ref, out, in, and params. See use cases, code examples, and performance tradeoffs.
C# Return Statement: Syntax and Behavior
Understand the C# return statement: syntax, compiler requirements, early returns, void methods, tuples, async behavior, and ref returns.
C# Void Method: Syntax, Usage, and Common Pitfalls
c# void method: Learn how to declare and use void methods in C#, understand their limitations, and avoid common pitfalls like async void exception handling.
C# Method Call: Syntax, Parameters, and Return Values
Learn how to call methods in C#: syntax, argument passing by value and by reference, return values, named and optional arguments, and overload resolution.