c# reverse string
public static void Main(string[] args)
{
string s = "aeiouXYZ";
Console.Write(Reverse(s) );
}
public static string Reverse(string s)
{
var result = new string(s.ToCharArray().Reverse().ToArray() );
return result;
}public static string ReverseString(string s)
{
char[] arr = s.ToCharArray();
Array.Reverse(arr);
return new string(arr);
}public void ReverseString(char[] s) {
for(int i = 0; i < s.Length / 2; i++) {
char temp = s[i];
s[i] = s[s.Length - 1 - i];
s[s.Length - 1 - i] = temp;
}
}
Also in C#:
- how to pass an optional parameter in c# mvc asp.net
- use enter key unity
- c# rsa example
- get and set for array c#
- unity enum
- c# loop datatable rows
- when do i need to end a sentence with ; in c#
- unity search for specific text in a string
- c# post request
- asp.net mvc 5 codefirst dropdown list
- unity c# get bool from another script
- how to check if textbox is empty in c#
- unity get velocity of gameobject
- c# get every point in a line in matrix
- unity get number of child objects
- how to copy one array value to another without reference c#
- asp.net list all files in folder
- c# or
- sending data photon c#
- unity html request
- how to go to other forms in C#
- how to get joypad axis input unity
- C# events
- how to get object to spawn in a curcle