using System;
//csc string_char_conversion.cs
namespace ex_empty
{
public class test
{
public static void Main()
{
string s1="hello world";
char s2=Convert.ToChar(s1.Substring(0,1));
Console.WriteLine(s2);
}
}
}

using System;
//string_chat_convert_string.cs
namespace ex_stringsplit
{
public class string_split
{
public void split_to_char(string s2 )
{
Console.WriteLine("You enetered : " + s2);
string[] s_array = s2.Split(new Char[]{' ', ',', '.', ':'});
int x1 = s2.Length;
char[] ch = new char[s2.Length];
int i = 0;
string regenerate = "";
foreach (string s in s_array) {
if (s.Trim() != "")
//Console.WriteLine(s);
i += i;
ch[i]= Convert.ToChar(s.Substring(0,1));
Console.Write(ch[i]);
regenerate +=Convert.ToChar(ch[i]);

}//end for loop
Console.WriteLine();
Console.WriteLine(regenerate);


}//end method string_split
}//end class
class Test
{
static void Main() {
Console.Write("Enter comma sepearted word or letters : ");
string str = Console.ReadLine();
string_split ssp = new string_split();
ssp.split_to_char(str);
Console.ReadLine();
}
}//end class test
}//end name space