Here i will give method for displaying reverse of string value using C#.net
ReverseValue is a method for display reverse of string.
ReverseValue is a method for display reverse of string.
public static string ReverseString(string str)
{
int length =str.Length -1;
while (length >-1)
{
stringresult = stringresult + str[length];
length--;
}
return stringresult;
}
Call method :
string str = DerivedClass.ReverseString("LAKSHMI");MessageBox.Show(str.ToString());
No comments:
Post a Comment