StringSplitOptions not working
-
יום רביעי 12 אפריל 2006 13:16
In my code I have the following line which splits a string into multiple strings using the end-of-line as a seperator:
string
[] reqStringArray = reqString.ToString().Split(new string[] { "\\r\\n" }, StringSplitOptions.RemoveEmptyEntries);According to the documentation this function is now supported in the Compact Framework 2 as well, but it doesn't seem to recognize the StringSplitOptions object:
"The name 'StringSplitOptions' does not exist in the current context"
The weird thing is that the Intellisense does have the StringSplitOptions object in the list when I type it.
Any ideas why it is not working?
כל התגובות
-
יום רביעי 12 אפריל 2006 20:53מנחה דיון
There's no StringSplitOptions and there's no such overload of String.Split() in NETCF, only one overload of Split() is available. IntelliSense shows only one overload of Split(), but there appears to be a documentation bug on MSDN.
-
יום חמישי 13 אפריל 2006 09:14That indeed seems to be the case. Better get that documentation fixed though!
-
יום חמישי 23 פברואר 2012 16:17The msnd documentation shows StringSplitOptions enumeration availability only for .NET Framework 2.0
http://msdn.microsoft.com/en-us/library/system.stringsplitoptions(v=vs.80).aspx
It is very odd that it was removed starting with 3.0
- נערך על-ידי Daniel Neamtu יום חמישי 23 פברואר 2012 16:19