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
Select an image from your device to upload
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
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