C# Beginners Tutorial – 55 – Generating Random String

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

9 responses to “C# Beginners Tutorial – 55 – Generating Random String”

  1. Semphortune Avatar

    I want to make a random string that prints out the words "rock", "paper", "scissors" not random letters. Idk if you can help me out?

  2. best pikachu fan in the world Avatar

    Thanks, this helped a lot 😛
    I think this tutorial is really helpful for noobs like me.

  3. Ethan Vincze Avatar

    My code won't let me use MessageBox it always shows an error saying that it isn't in the context. Does anyone know why?

  4. NeverInterpreter Avatar

    Random.Next(0,25) will not ever return 25, because the upper bound is exclusive. So you will never get to the 'z' character. You should always add 1 to the maxValue, if you want it to be included.

  5. Michał Wilczyński Avatar

    Computers count from 0.
    So if u want to find something in 26-long array, u search from index 0 to 25 (which will give us 26 options).

  6. kingollie07 Avatar

    How would I be able to display them to labels?

  7. nooorAlshms Avatar

    Great video,,Thank you 🙂

  8. Crystal Sergeant Avatar

    @wetwetu yes you can use split method to put al strings in string array and than you randomly go through then

    stringArray[Random.Next()] and if you want to be shore to not make some string twice just use if statement if it's been already used

Leave a Reply

Your email address will not be published. Required fields are marked *