I have this code:
Dim StringParts As New List(Of String)(OriginalString.Split(New Char() {"\"c}, StringSplitOptions.RemoveEmptyEntries))
When run, StringParts always have one element, because StringSplitOptions.RemoveEmptyEntries = 1.
How can I tell VB.Net to use the right function, and not understand StringSplitOptions.RemoveEmptyEntries as a count parameter?
Thanks!
Note: Using New String() {"\"} instead of New Char() {"\"c} works. Is this a .Net bug?
Unable to reproduce:
The above code prints 3 (compiled with both VS2010 and VS2008, to avoid this being a missing overload issue). In both cases the compiled code is using the enum value appropriately, rather than converting it into a number.
I suspect your problem lies elsewhere. Please try to edit your question with a short but complete program which demonstrates the problem.