How to select a character from a string? for example: string str = "Hello"; from the above string how to get the first letter into char c;
vinay kumar
hello,Hirendra Sisodiya Char C=str.SubString(0,1).tostring()As you told this solution. can You please explain me wt does (0,1) means in above code?
c = str.charAt(0)
private char GetChar(string myString, char myChar)
{
return convert.toChar(myString.Substring(myString.IndexOf(myChar),myString.IndexOf(myChar)));
}
by calling this funtion you will get the expected character from string
Hi Vinay,As you ask about the string related problem, just read this article, i hope this article help you. Click hear...
Most programming languages are very rich in string operation..
if we talk about VB.NET, we can use substring function like this
Char C=str.SubString(0,1).tostring()
thanks