If I have a string like MCCORMIC 3H R Final 08-26-2011.dwg or even MCCORMIC SMITH 2N L Final 08-26-2011.dwg and I wanted to capture the R in the first string or the L in the second string in a variable, what is the best method for doing so? I was thinking about trying the below statement but it does not work.
string filename = "MCCORMIC 3H R Final 08-26-2011.dwg" string WhichArea = ""; int WhichIndex = 0; WhichIndex = filename.IndexOf("Final"); WhichArea = filename.Substring(WhichIndex - 1,1); //Trying to get the R in front of word Final