C# string functions
C# string functions
C# string functions
Splits the string into an array string str = "a,b,c"; string[] parts = str.Split(',');
Split based on a delimiter. Console.WriteLine(parts[0]); a
C# string functions
Copies a specified range of string str = "Hello"; char[] arr = new char[5]; str.CopyTo(0, arr, 0, 5);
CopyTo characters into an array. Console.WriteLine(arr); Hello
C# string functions
Converts the string into a string str = "Hello"; char[] chars = str.ToCharArray();
ToCharArray character array. Console.WriteLine(chars[0]); H