19 lines
454 B
C#
19 lines
454 B
C#
|
Console.WriteLine("\n--- Reverse ---\n");
|
|||
|
string value = "abc123";
|
|||
|
char[] valueArray = value.ToCharArray();
|
|||
|
Array.Reverse(valueArray);
|
|||
|
string result = new string(valueArray);
|
|||
|
Console.WriteLine(result);
|
|||
|
|
|||
|
Console.WriteLine("\n--- Join ---\n");
|
|||
|
|
|||
|
result = String.Join(",", valueArray);
|
|||
|
Console.WriteLine(result);
|
|||
|
|
|||
|
Console.WriteLine("\n--- Split ---\n");
|
|||
|
|
|||
|
string[] items = result.Split(',');
|
|||
|
foreach (string item in items) {
|
|||
|
Console.WriteLine(item);
|
|||
|
}
|