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 383 of 397C# Equals vs ==: How They Differ and When to Use Each
c# equals vs ==: Understand the difference between the == operator and the Equals method in C#, including reference vs value types, operator overloading, and practical...
C# String Equals: Choosing the Right Comparison
Understand C# string equality with ==, Equals, and String.Compare, including ordinal vs. culture-sensitive behavior, null handling, and performance trade-offs.
C# String Comparison: Ordinal vs Culture
Learn how to compare strings in C#: choose between ordinal and culture-sensitive behavior, use == and Equals effectively, and apply StringComparison when you need explicit control.
C# ToUpper and ToLower: String Case Conversion
c# toupper tolower: Learn how to use C# ToUpper and ToLower for string case conversion, including culture-sensitive and invariant overloads, with practical examples an...
C# TrimStart vs TrimEnd: When to Use Each
Compare C# TrimStart and TrimEnd: their overloads, behavior with whitespace and character sets, null handling, and practical examples for trimming one side of a string.
C# Trim: Removing Whitespace and Characters
c# trim: Learn how to use C# Trim, TrimStart, and TrimEnd to remove whitespace and custom characters from strings, including performance and culture considerations.
Find the Last Occurrence with C# LastIndexOf
c# lastindexof: Learn C# LastIndexOf syntax, overloads, and practical use cases to find the last occurrence of a character or substring in a string.
Using C# IndexOf Effectively
Learn how to use the IndexOf method in C# on strings and collections, including overloads, comparison rules, error handling, and practical tradeoffs.
C# String StartsWith and EndsWith Usage
Learn how to use C# StartsWith and EndsWith methods for string prefix and suffix checks, including overloads, StringComparison, culture considerations, and practical examples.
C# String Contains: Usage, Case-Insensitive Checks, and Performance
Learn how to use C# String.Contains, handle case sensitivity with StringComparison, and choose between ordinal and culture-sensitive comparisons.