Browse by Topic

Popular

Latest

Latest Posts

Diagram showing nullable and non-nullable reference type annotations in C# code
C#

C# Non-Nullable Reference Type Syntax

Learn the C# non-nullable reference type syntax: enable the nullable context, use the ? and ! operators, and handle compiler warnings in new and legacy code.

nullable reference typesC# syntaxnull safetycompiler warnings
Illustration of C# nullable reference type syntax showing a question mark on a reference type.
C#

Understanding C# Nullable Reference Type Syntax

Learn how to use C# nullable reference type syntax, including enabling nullable annotations, declaring nullable and non-nullable references, using the null-forgiving operator, and handling compiler warnings during migration.

C#Nullable Reference TypesNull SafetyCompiler Warnings
Diagram showing nullable reference type annotations and compiler warnings in C#.
C#

C# Nullable Enable Usage: Syntax and Patterns

c# nullable enable usage: Learn how to enable and use C# nullable reference types, interpret compiler warnings, and apply practical patterns for safer code.

nullable reference typesC#compiler warningstype safety
Editorial illustration showing a C# code editor panel with a question mark symbol inside a shield, representing compile-time null safety.
C#

Using C# Nullable Reference Types in Real Code

c# nullable reference type usage: Learn how to use C# nullable reference types: enabling the context, annotating with ?, handling warnings, and applying null-analysis...

nullable reference typesnull safetyC# compiler warningscode analysis
Diagram showing a nullable int variable with a value and null state, illustrating HasValue and Value access.
C#

C# Nullable Int Usage: Syntax, Checks, and Pitfalls

Learn how to declare, check, and safely read nullable int values in C#. Covers int? syntax, HasValue checks, safe retrieval, common pitfalls, and performance characteristics.

C#nullableintnull handling
Illustration of a C# object type box containing various value types like integers and strings, with arrows showing boxing and unboxing.
C#

C# Object Type Usage: When and How to Use It

Practical guidance for using the C# object type: boxing and unboxing mechanics, performance tradeoffs, and safer alternatives like generics.

C# object typeboxing and unboxingtype safetygenerics
A diagram showing a light switch with true and false labels, representing C# boolean values.
C#

C# Bool Usage: Syntax, Operators, and Pitfalls

C# bool usage explained: declaration, short-circuit operators, nullable bool, method return types, and common mistakes.

C#BooleanNullableOperators
A visual comparison of a single character box and a sequence of characters representing char and string in C#.
C#

C# char vs string: When to Use Each Type

c# char vs string: Understand the differences between char and string in C#, including memory, equality, and performance, to choose the right type for your code.

C#charstringtype comparison
Editorial illustration comparing C# float, double, and decimal numeric types showing precision and range differences
C#

C# Float vs Double vs Decimal: Key Differences

Compare C# float, double, and decimal: precision, range, memory, and performance tradeoffs, plus practical guidance on choosing the right numeric type.

C# numeric typesfloating point precisiondecimal vs doubleSystem.Decimal
Comparison of C# integer types byte, short, int, and long showing their bit widths and ranges.
C#

C# Integer Types: Choosing Between byte, short, int, and long

Understand the differences between byte, short, int, and long in C#: ranges, memory footprint, overflow behavior, conversions, and when each type fits.

C#integer typesnumeric rangesoverflow