0

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! ");
}
}
}
}

Edited by happygeek: fixed formatting

2
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by shazzy99
0

oops! my bad :)

thanks

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.