Forgive me if this is already covered somewhere which I am sure it is but............
All I am trying to do is split a string that contains the \ char ie filename.
Seen a few ideas and after much frustration I have settled with below code. Replace works fine. Split seems to do nothing. If I add my array to my watches then it tells me it doesn't exist in this context as if its completely unavailable. Anyone got some ideas on what could be causing this?
string fName = fPath.Replace("\\", ",");
string[] fNamearray = null;
char[] splitchar = { ',' };
fNamearray = fName.Split(splitchar);
fName after replace = "C:,Documents and Settings,Administrator.GLIDESOLUTIONS,My Documents,ErrorCheckDateFormat.retry.xls"
fNamearray is non existant
Have also tried
string fName = fPath.Replace("\\", ",");
char[] splitchar = { ',' };
string[] fNamearray = fName.Split(splitchar);
Thanks in advance for any help
Mark