I don't understand why I'm getting the following error in the last statement of this string of code:
Basically, what I'm trying to do is to split strings within each line of a document where there is an "=" sign present and remove any empty space around that "=" sign.
I have tried placing a ToString() at the end of the method and changing the parameters of the Split() method, but neither are working. What can I do to eliminate this error? Should I be using a different class from StringBuilder?
Cheers,
Matt
Code:
string current = str.ReadLine();
StringBuilder currentstr = new StringBuilder(fileName);
//try and locate the details from within the file
//do a substring search for these items - store whatever appears after = and before },
PaperProperties prop = new PaperProperties();
prop.Author1FirstName = current.Split("=", StringSplitOptions.RemoveEmptyEntries);
I have tried placing a ToString() at the end of the method and changing the parameters of the Split() method, but neither are working. What can I do to eliminate this error? Should I be using a different class from StringBuilder?
Cheers,
Matt
Comment