© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•16mo ago•
3 replies
Golbin Machine

✅ static r public?

I was writing code something like this,
class Physics
{
public int Force;
}
and I was trying to access the Force variable I have, but it said I needed the variable to be static. Why was it asking me this when I already have public down?
Screenshot_2024-10-27_162058.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

✅ static, public, void
C#CC# / help
16mo ago
Properly understanding Public Static
C#CC# / help
2y ago
Public, Private, and Static Modifiers
C#CC# / help
2mo ago
public static variable not changing
C#CC# / help
4y ago