[help] cases

Discussion in 'Programming General' started by mama luigi, Jun 29, 2011.

[help] cases
  1. Unread #1 - Jun 29, 2011 at 12:31 AM
  2. mama luigi
    Joined:
    May 5, 2010
    Posts:
    11
    Referrals:
    0
    Sythe Gold:
    0

    mama luigi Newcomer

    [help] cases

    I am making a RS client much like the official one, where you can change the language. When a language is chosen, it is saved to My.Settings. Instead of multiple "If" statements, I would like to use cases to shorten the length of my code. But I cannot figure out how to use cases correctly. Can anyone help?

    What I have so far...
    Code:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Select Case My.Settings.rs_lang
                Case 
            End Select
        End Sub
     
  3. Unread #2 - Jun 30, 2011 at 3:17 AM
  4. iWoodKart
    Joined:
    Apr 29, 2011
    Posts:
    162
    Referrals:
    0
    Sythe Gold:
    0

    iWoodKart Active Member
    Banned

    [help] cases

    Select Case My.Settings.rs_lang
    Case 1stLang
    WriteLine("Lang 1")
    Case 2ndLang
    WriteLine("Lang 2")
    etc...
    End Select
     
< Need something done? | [RSGP][Paypal]Make your own MMORPG game ebook >

Users viewing this thread
1 guest


 
 
Adblock breaks this site