reverse a string in c#
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;
}
}public static string ReverseString(string s)
{
char[] arr = s.ToCharArray();
Array.Reverse(arr);
return new string(arr);
}
Also in C#:
- how to hide and show object in unity script
- isprime c#
- serilog loglevel order
- unity rotate around point
- unity if gameobject exists
- unity separator in inspector
- c# return multiple value unity
- unity random float
- unity print
- quaternion euler
- c# distinct comparer multiple properties
- mongodb custom IIdGenerator
- is start called after dontdestroyonload
- c# access session in class
- repeat 10 timesw c#
- open zip file in c#
- json ignore property c#
- c# ref
- unity3d invector expand fsm controller
- c# get hwid
- datatable return column names
- write last line txt file c#
- get hash c#
- validating file upload asp.net core mvc