Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. what is differeence between i.equal(j) and i=j in vb.net?

what is differeence between i.equal(j) and i=j in vb.net?

Scheduled Pinned Locked Moved Visual Basic
questioncsharp
8 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sathyan_8294
    wrote on last edited by
    #1

    what is differeence between i.equal(j) and i=j in vb.net.

    C T G E 4 Replies Last reply
    0
    • S sathyan_8294

      what is differeence between i.equal(j) and i=j in vb.net.

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      sathyan_8294 wrote:

      what is differeence between i.equal(j) and i=j in vb.net.

      What's equal?:confused: Do you intend Object.Equals(), don't you?

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      S 1 Reply Last reply
      0
      • C CPallini

        sathyan_8294 wrote:

        what is differeence between i.equal(j) and i=j in vb.net.

        What's equal?:confused: Do you intend Object.Equals(), don't you?

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

        S Offline
        S Offline
        sathyan_8294
        wrote on last edited by
        #3

        we r using variables?

        C 1 Reply Last reply
        0
        • S sathyan_8294

          we r using variables?

          C Offline
          C Offline
          CPallini
          wrote on last edited by
          #4

          How have you declared i and j???

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

          C 1 Reply Last reply
          0
          • C CPallini

            How have you declared i and j???

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

            C Offline
            C Offline
            Colin Angus Mackay
            wrote on last edited by
            #5

            CPallini wrote:

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

            "There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened." - The Guide.


            Upcoming Scottish Developers events: * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

            1 Reply Last reply
            0
            • S sathyan_8294

              what is differeence between i.equal(j) and i=j in vb.net.

              T Offline
              T Offline
              Thomas Stockwell
              wrote on last edited by
              #6

              It could be that it was placed in the framework so it would be more familiar to developers who are coming from the Java programming language. In Java, the == boolean expression returns true if two strings share the same memory address and false if the two memory addresses are different. The .equals method in Java would properly determine whether each of the memory addresses contain the same information. For VB and VC# I would imagine that the == and .equals (or in VB's case: = and .equals) should have the same purpose, but this is just a guess as neither of the languages really use pointers.

              Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios[^]

              1 Reply Last reply
              0
              • S sathyan_8294

                what is differeence between i.equal(j) and i=j in vb.net.

                G Offline
                G Offline
                Guffa
                wrote on last edited by
                #7

                That depends very much on the data types of the variables. The Equals method of the i variable is called with whatever data the j variable contains, while the behaviour of the = operator depends on the data types. If the data types are the same or can easily be converted to the same type, the = operator method for that data types is used, which usually does the same as the Equals method. Otherwise a huge method (hundreds of lines of code) in the Microsoft.VisualBasic library is called, that determines how the values can be compared and how it should be done.

                --- Year happy = new Year(2007);

                1 Reply Last reply
                0
                • S sathyan_8294

                  what is differeence between i.equal(j) and i=j in vb.net.

                  E Offline
                  E Offline
                  Enriad
                  wrote on last edited by
                  #8

                  .equals is for comparing things other than numbers or words, like controls. if textboxTMP.equals(textboxName) kind of thing, if you're working with say, forms or addressbooks and you need to have some sort of checking rather than a loop or select for each control. Personally, I don't use it, so I can't think of a useful instance, though I'm sure there are a few. Daniel

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups