We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

problem converting from c# to vb.net

mathieu_cupryk
on
Medium Priority
320 Views
Last Modified: 2012-06-27
When I try to convert
string[] strs = processstr.Split(new char[] { ' ' }, true);
it gives me this
Dim strs As String() = processstr.Split(New Char() {" "c}, True)
with an error/

Error      1      Overload resolution failed because no accessible 'Split' can be called without a narrowing conversion:
    'Public Function Split(separator() As Char, options As System.StringSplitOptions) As String()': Argument matching parameter 'options' narrows from 'Boolean' to 'System.StringSplitOptions'.
    'Public Function Split(separator() As Char, count As Integer) As String()': Argument matching parameter 'count' narrows from 'Boolean' to 'Integer'.      C:\svn\scraper_cingular\code\Module1.vb      95      36      ScrapeFilesFromCingular
Comment
Watch Question

Commented:
Hi,

There is no split method that takes a boolean as second param.  Remove ", True". Or what is it you want to do?


/peter

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.