© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
21 replies
PunMister

✅ Newbie question on Random function

When making a random function what is the significance of the first line. I can't understand what it means here:

Random rnd = new Random(); <-----
int num = rnd.Next();

I know the second line generates a random integer using ".Next" but "Random" doesn't make sense to me
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Just a random question
C#CC# / help
3y ago
Newbie
C#CC# / help
2y ago
Newbie
C#CC# / help
3y ago
Newbie question: Decleration of stack vs Arrays
C#CC# / help
2y ago