Hi Ganesh,
See example:
public static void Main()
{
string sentence = "The dog had a bone, a ball, and other toys.";
char[] charsToTrim = {',', '.', ' '};
string[] words = sentence.Split();
foreach (string word in words)
Console.WriteLine(word.TrimEnd(charsToTrim));
}
Cheers,
Edo