string s = "alia ankit sahoo"; string[] words = s.Split(' '); for (int i = 0; i < words.Length - 1; i++) { words[i] = words[i].Substring(0, 1); } s = string.Join(".", words);
string
.ToCharArray()
String[] strShortName = TextBox1.Text.Split(' '); string str1 = ""; for (Int16 i = 0; i < strShortName.Length; i++) { if (i < 2) { str1 = str1 + strShortName[i].ToString().Substring(0,1) + "."; } else { str1 = str1 + strShortName[i]; } } TextBox2.Text = str1;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)