Results 1 to 3 of 3

Thread: errors,errors,errors

  1. #1

    Thread Starter
    Fanatic Member memas's Avatar
    Join Date
    Jan 2010
    Location
    athens,greece
    Posts
    531

    errors,errors,errors

    i have a code that when i put the strict on give me theses errors how can i solve them
    thank you


    Error 1 Option Strict On prohibits operands of type Object for operator '&'.
    For Each obj As Object In al
    Number_Array(index).num(counter) = CInt(al(counter))
    number_str += "-" & al(counter)
    counter += 1
    Next
    Number_Array(index).num_str = number_str.Substring(1)

    Warning 2 variable 'activated' conflicts with event 'activated' in the base class 'Form' and should be declared 'Shadows'.

    Error 3 Option Strict On disallows implicit conversions from 'String' to 'Double'.

    str = ((((x & "") + y & "") + z & "") + w & "") + v

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: errors,errors,errors

    number_str += "-" & al(counter)

    "-" is a string .... & is used to concatenate strings...
    what's the data type of the items in the al array? .... also ... why are you doing a For Each, then not using the object you're creating? Where is counter defined? .... your code doesn't make a whole lot of sense... what are you trying to do?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: errors,errors,errors

    You need to show us a bit more code...
    VB.NET MVP 2008 - Present

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width