ASKER
char[] getRight(string str,int postfromright)
{
if (postfromright>=str.Length) return 0;
else return str[str.Length-postfromright-1];
}
string getRight(string str,int postfromright,int count)
{
if (postfromright>=str.Length+count) return "";
else return str.SubString([str.Length-Post-1],count);
}
ASKER
String s, t;
s = "111999123412301";
t = Strings.Right(s, 3);
char c = t.FirstOrDefault();
Response.Write(c);
The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications
TRUSTED BY
If the string is 10 chars long then Length is 10, if 20 then Length is 20, if 12345 then length is 12345.