last day i faced a need like this. to split all characters in a sentence one by one and i used CharEnumerator for that it helped to do it easily.
Code
protected void CharEnumerator_Demo()
{
string _d = "My name is Arun";
Response.Write("Input:My name is Arun");
Response.Write("<br />");
Response.Write("OutPut:");
Response.Write("<br />");
CharEnumerator chs = _d.GetEnumerator();
while (chs.MoveNext())
{
Response.Write(chs.Current);
Response.Write("<br />");
}
}
Output
Have a nice day... 'N happy Coding :)
No comments:
Post a Comment