I have a dynamically formed string like - part1.abc.part2.abc.part3.abc
In this string I want to know position of second to last \".\" so that i can split string as
You can use String.Split() method, which returns an array of the splitted items. You can then concatenate the first 2 and leave the last one.