Getting the following error Error

'System.StringSplitOptions' does not contain a definition for 'RemoveEmptyEntires'

string[] lines = File.ReadAllLines(fileName);
char[] delim = new char[1];
delim[0] = ' ';
foreach (string line in lines)
{
if (line != string.Empty)
{
string[] words = line.Split(delim, StringSplitOptions.RemoveEmptyEntires);
// here you've got all your words in that array. Do what you want with them
foreach (string word in words)
{
MessageBox.Show(" zp! ");
}
}
}
}

Recommended Answers

All 6 Replies

You have mistake in word Entries in the 'RemoveEmptyEntires'.

commented: Well noticed! +4

oops! my bad :)

thanks

You have mistake in word Entries in the 'RemoveEmptyEntires'.

lolz ... :) Good luck!

Thanks, it works now :)

oops! my bad :)

thanks

if so, mark this thread as solved, please :)

Done!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.