VB.net question (lower case to upper and vice versa)

Discussion in 'OT Technology' started by Er0si0n, Nov 25, 2006.

  1. Er0si0n

    Er0si0n New Member

    Joined:
    Jul 12, 2004
    Messages:
    239
    Likes Received:
    0
    Location:
    Sterling Heights, MI
    Can anyone give me some help on this one?

    I'm trying to take a string and change all the lower case letters to upper case, and all the upper case letters to lower case.

    For j = 0 To (Length2 - 1)
    If mystring(j).IsUpper Then
    LCase(mystring(j))
    Else
    UCase(mystring(j))
    End If
    Next j

    That's what I have, I feel like my logic is correct, but I get an error saying "No available IsUpper accepts this number of arguements."
     
  2. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    mid(mystring,j,1)
     
  3. GOGZILLA

    GOGZILLA Double-Uranium Member

    Joined:
    Jan 16, 2003
    Messages:
    10,760
    Likes Received:
    3
    Location:
    Plantation, FL
    also im pretty sure strings start at index 1 in visual basic
     
  4. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Yes, you're right - arrays start at 0 tho.
     
  5. mobbarley

    mobbarley Active Member

    Joined:
    Mar 4, 2005
    Messages:
    9,256
    Likes Received:
    2
    Location:
    Sydney
    does UCASE() etc exist in .net? could be faster..
    whoops im dumb, just saw that is what you are using.
     

Share This Page