© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
HydraCube

❔ Random numberGen Error

Trying to make a random number generator, and I keep getting this error:

"A field initializer cannot reference the non-static field, method, or property 'combat.numberGen'"
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Random
C#CC# / help
13mo ago
✅ Random
C#CC# / help
4y ago
Not so random, random drawing...
C#CC# / help
2y ago
✅ Get Random number between 0 -100 error
C#CC# / help
3y ago