Page 13 - CSharp/C#
P. 13
Collection Initializers with Parameter Arrays 194
Using collection initializer inside object initializer 195
Chapter 36: Comments and regions 197
Examples 197
Comments 197
Single line comments 197
Multi line or delimited comments 197
Regions 198
Documentation comments 199
Chapter 37: Common String Operations 201
Examples 201
Splitting a String by specific character 201
Getting Substrings of a given string 201
Determine whether a string begins with a given sequence 201
Trimming Unwanted Characters Off the Start and/or End of Strings. 201
String.Trim() 201
String.TrimStart() and String.TrimEnd() 202
Formatting a string 202
Joining an array of strings into a new one 202
Padding a string to a fixed length 202
Construct a string from Array 202
Formatting using ToString 203
Getting x characters from the right side of a string 203
Checking for empty String using String.IsNullOrEmpty() and String.IsNullOrWhiteSpace() 205
Getting a char at specific index and enumerating the string 206
Convert Decimal Number to Binary,Octal and Hexadecimal Format 206
Splitting a String by another string 207
Correctly reversing a string 207
Replacing a string within a string 209
Changing the case of characters within a String 209
Concatenate an array of strings into a single string 209
String Concatenation 210

