[question] c# algorithm menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    wildrunner's Avatar Sergeant
    Reputation
    9
    Join Date
    Jan 2012
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [question] c# algorithm

    hey guys and gals
    im looking for a way to create an algorithm
    the algorithm needs to be randomming strings
    a piece of code to describe:
    string 1;
    string 2;
    string 3;

    private void button1_Click(object sender, EventArgs e)
    {
    messagebox.show(insertalgorithmhere);

    }

    i do not need anyone to give me the complete answer but rather a hint of how-to

    thanks upfront

    [question] c# algorithm
  2. #2
    MartinRFC's Avatar Member
    Reputation
    7
    Join Date
    Aug 2008
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
                String s = "";
                Random rand = new Random();
                switch(rand.Next(3))
                {
                    case 0:
                        s = "String 0";
                        break;
                    case 1:
                        s = "String 1";
                        break;
                    case 2:
                        s = "String 2";
                        break;
                }
                textBox1.Text = s;

Similar Threads

  1. [Question] Pathfinding Algorithm/Lib?
    By DrakeFish in forum Programming
    Replies: 1
    Last Post: 10-03-2011, 11:16 AM
  2. Model Changing Question
    By MasterYuke in forum World of Warcraft General
    Replies: 6
    Last Post: 09-17-2006, 09:56 PM
  3. Sorry..newb mail question
    By nolbishop in forum World of Warcraft General
    Replies: 2
    Last Post: 06-07-2006, 07:21 PM
  4. Question..
    By janzi9 in forum Community Chat
    Replies: 3
    Last Post: 04-02-2006, 10:20 AM
  5. A GALB question
    By bassman in forum World of Warcraft General
    Replies: 4
    Last Post: 03-28-2006, 09:49 AM
All times are GMT -5. The time now is 12:07 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search