C# Tutorial Beginner Series Part 1 | How To Generate a random Number |Loop Timer

What You Think About The Tutorial Series?

  • Bad Idea

    Votes: 0 0.0%

  • Total voters
    2

Syndicate

Modder
Messages
670
Reaction score
547
Points
908
I Have Decided To Start a Tutorial Series Dedicated To C# :grinning:
Every Other Day, I Will Release Another Tutorial and Build Up The Series!
All Codes in this Series will be written by me personally
*This Series Is Aimed For Beginners, So I Wont Be Getting Too Technical Throughout The Series!.*

Reasons Why Im Starting This Series On The Forum;

1. Too Much Gay GSC On This Forum
2. Hopefully Get More People To Work With C#
3. C# Is Sexy
4. Pretty Easy To Pick Up

To Start The Series Off, This Thread Will Teach You How To Generate A Number;

//How To Generate Random Number

private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
// Min= Lowest Possible Number | Max- max possible number
}

// Button Pressed
{ //Min, Max
textBox1.Text = RandomNumber(10, 20).ToString();
}




Generate Numbers Using A Timer Loop!

//Loop Random Number

private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
}

//Button Pressed | Starts Loop
{
timer1.Start();
}

//Button Pressed | Stops Loop
{
timer1.Stop();
}

private void timer1_Tick(object sender, EventArgs e)
{
textBox1.Text = RandomNumber(10, 20).ToString();

}

Hopefully this tutorial is understandable, if for some reason you need help from this series at any time, feel free to skype me. Skype- FourSeasonModz

Please Also Note : If you make any of these methods static, the number generation will always result in the same number
 
Last edited:

Encryption

Co-Leader of SM|T
Messages
27
Reaction score
12
Points
3
I Have Decided To Start a Tutorial Series Dedicated To C# :grinning:
Every Other Day, I Will Release Another Tutorial and Build Up The Series!
All Codes in this Series will be written by me personally
*This Series Is Aimed For Beginners, So I Wont Be Getting Too Technical Throughout The Series!.*

Reasons Why Im Starting This Series On The Forum;

1. Too Much Gay GSC On This Forum
2. Hopefully Get More People To Work With C#
3. C# Is Sexy
4. Pretty Easy To Pick Up

To Start The Series Off, This Thread Will Teach You How To Generate A Number;

//How To Generate Random Number

private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
// Min= Lowest Possible Number | Max- max possible number
}

// Button Pressed
{ //Min, Max
textBox1.Text = RandomNumber(10, 20).ToString + RandomNumber(10, 20).ToString();
}




Generate Numbers Using A Timer Loop!

//Loop Random Number

private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
}

//Button Pressed | Starts Loop
{
timer1.Start();
}

//Button Pressed | Stops Loop
{
timer1.Stop();
}

private void timer1_Tick(object sender, EventArgs e)
{
textBox1.Text = RandomNumber(10, 20).ToString + RandomNumber(10, 20).ToString();

}

Hopefully this tutorial is understandable, if for some reason you need help from this series at any time, feel free to skype me. Skype- FourSeasonModz
Nice! This will definitely help out the people new to coding!
 

Syndicate

Modder
Messages
670
Reaction score
547
Points
908
i should hope soo xD, tomorrow ill work on a C# Syntax Thread, as thats gonna be an important part of the series
 
S

SeriousHD-

Guest
I Have Decided To Start a Tutorial Series Dedicated To C# :grinning:
Every Other Day, I Will Release Another Tutorial and Build Up The Series!
All Codes in this Series will be written by me personally
*This Series Is Aimed For Beginners, So I Wont Be Getting Too Technical Throughout The Series!.*

Reasons Why Im Starting This Series On The Forum;

1. Too Much Gay GSC On This Forum
2. Hopefully Get More People To Work With C#
3. C# Is Sexy
4. Pretty Easy To Pick Up

To Start The Series Off, This Thread Will Teach You How To Generate A Number;

//How To Generate Random Number

private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
// Min= Lowest Possible Number | Max- max possible number
}

// Button Pressed
{ //Min, Max
textBox1.Text = RandomNumber(10, 20).ToString + RandomNumber(10, 20).ToString();
}




Generate Numbers Using A Timer Loop!

//Loop Random Number

private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
}

//Button Pressed | Starts Loop
{
timer1.Start();
}

//Button Pressed | Stops Loop
{
timer1.Stop();
}

private void timer1_Tick(object sender, EventArgs e)
{
textBox1.Text = RandomNumber(10, 20).ToString + RandomNumber(10, 20).ToString();

}

Hopefully this tutorial is understandable, if for some reason you need help from this series at any time, feel free to skype me. Skype- FourSeasonModz
Please also note: If you make any of these methods static, the number generation will always result in the same number
 

Syndicate

Modder
Messages
670
Reaction score
547
Points
908
Please also note: If you make any of these methods static, the number generation will always result in the same number
lool forgot to mention that, thnx ahahaha :smile: . maybe i should catch on sleep before writing tutorials
 

iTahhr

Well-Known Member
Messages
248
Reaction score
118
Points
243
nice i like this it helps people learn one of the better tuts ive seen keep the good work up try adding more detail and explain it more
 

Syndicate

Modder
Messages
670
Reaction score
547
Points
908
nice i like this it helps people learn one of the better tuts ive seen keep the good work up try adding more detail and explain it more

thank you! i will go in more depth next time, its hard to remember to do when writing the code/tut
 

Syndicate

Modder
Messages
670
Reaction score
547
Points
908
no problem, ok Mabey u could do videos on it ?
i had that idea alot, but i dont really wanna start a youtube channel tbh + rendering and all that ****. i have no idea with video editing or anything, really have not looked into that side of things. in the future though i most likely will!!
 

iTahhr

Well-Known Member
Messages
248
Reaction score
118
Points
243
i had that idea alot, but i dont really wanna start a youtube channel tbh + rendering and all that ****. i have no idea with video editing or anything, really have not looked into that side of things. in the future though i most likely will!!
nice good luck mista
 

Encryption

Co-Leader of SM|T
Messages
27
Reaction score
12
Points
3
i had that idea alot, but i dont really wanna start a youtube channel tbh + rendering and all that ****. i have no idea with video editing or anything, really have not looked into that side of things. in the future though i most likely will!!
its a tutorial all you gotta do is cut out all the **** ups and put in some songs
 

Syndicate

Modder
Messages
670
Reaction score
547
Points
908
hahaha i deffo will in future, might be getting a Xeon Workstation soon (16 Cores) seen one cheap online , that probs be better for video editing than my current laptop :smile:
 
Top