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. vb. net

vb. net

Scheduled Pinned Locked Moved Visual Basic
csharpalgorithmshelp
3 Posts 3 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I need help on functions using vb.net i'm doing a little prog on sorting this is for my vb.net. i need to create a function that holds the highest integer out of 3 and another function that holds the lowest integer out of 3. Can some one please help me

    R W 2 Replies Last reply
    0
    • L Lost User

      I need help on functions using vb.net i'm doing a little prog on sorting this is for my vb.net. i need to create a function that holds the highest integer out of 3 and another function that holds the lowest integer out of 3. Can some one please help me

      R Offline
      R Offline
      Richard_Wolf
      wrote on last edited by
      #2

      If that is all you need your function to do, then you can add a function procedure to any form or module: Public Function MaxThree(byval Int1 as integer, byval Int2 as integer, byval Int3 as integer) as integer If Int1 > Int2 then if Int1 > Int3 then MaxThree = Int1 Exit Function End If End If If Int2 > Int3 Then ..... End Function This is an incomplete, very basic, example but I think you should get the idea from here.

      1 Reply Last reply
      0
      • L Lost User

        I need help on functions using vb.net i'm doing a little prog on sorting this is for my vb.net. i need to create a function that holds the highest integer out of 3 and another function that holds the lowest integer out of 3. Can some one please help me

        W Offline
        W Offline
        watagal
        wrote on last edited by
        #3

        try this:

        lowestValue = Math.Min(Math.Min(value1,value2),value3)
        

        and

        highestValue = Math.Max(Math.Max(value1,value2),value3)
        

        Thanks, Karen Nooobie to OOP and VB.Net 2005

        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