© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
25 replies
GavkoShmig

replace variable with random number

so lets say I have
int a = something
int a = something

what do I put instead of
something
something
to make
a
a
change value each time its called

for example:
Console.WriteLine(a);
Console.WriteLine(a);


output:
1
8
Console.WriteLine(a);
Console.WriteLine(a);


output:
1
8
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

random number
C#CC# / help
2y ago
❔ Random numberGen Error
C#CC# / help
3y ago
✅ comparing variable to a number
C#CC# / help
3y ago