Implicit conversion warning

  • Thread starter Thread starter Jared
  • Start date Start date
J

Jared

Hi,

I keep getting warnings for cloning string arrays and arrays of objects.

Should this feature just be disabled? or is ther a correct way of copying
structure.
 
Jared said:
Dim s() as string
sim s2() as string

s2=s.clone

\\\
Dim s1() As String
Dim s2() As String = DirectCast(s1.Clone(), String())
///
 
Jared,

String.Clone methods returns object. You need to cast it to string.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top