Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 299
  • Last Modified:

problem converting from c# to vb.net

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
1 Solution

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


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now