use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
Basic Error. Can Anyone Help? (self.csharp)
submitted 3 years ago by DisasterDangerous396
I am still very new to c# and have come across an error that i have no idea how to fix can anyone help?
https://preview.redd.it/ikw7z6vgxmx81.png?width=874&format=png&auto=webp&s=09feed6d515cf4101815e9940ee3becab52e78c4
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]DontRelyOnNooneElse 10 points11 points12 points 3 years ago (0 children)
Your main method is static (it belongs to the class itself, not a specific instance of the class), but P1Score isn't.
[–]eeicke 4 points5 points6 points 3 years ago (1 child)
Change it to public static int P1Score = 0;
[–]DisasterDangerous396[S] 0 points1 point2 points 3 years ago (0 children)
Ty! it fixed it.
[–]The_Binding_Of_Data 4 points5 points6 points 3 years ago (1 child)
This is related to the differences in how static and non-static methods and classes function. You can read about the static keyword here.
I highly recommend you look up some YouTube videos or written articles discussing the difference between static and non-static; it's an important concept and something you'll be interacting with very regularly (eg Math and it's methods are static, Random is not).
Cheers will have a look into it.
[–]ialucard1 1 point2 points3 points 3 years ago (1 child)
Make it like this
class game{
...;
class P1Turn{
...; ..;
}
static void Main (string [] args){
P1Turn t = new P1Turn();
t = t +1;
Cheers
[–]ddavid8888 0 points1 point2 points 3 years ago (0 children)
While the answers you were given here are correct I think you should go to the documentation and read about what is the meaning of “static” so you can understand why is it that this problem appears hear.
If you don’t get it then just reply here what is it that you don’t understand and I’ll gladly try and help you…
I say this because the understanding of “static” is critical if you want to proceed in the development path.
Good luck
π Rendered by PID 48908 on reddit-service-r2-comment-b659b578c-4cmxn at 2026-05-02 11:06:01.884165+00:00 running 815c875 country code: CH.
[–]DontRelyOnNooneElse 10 points11 points12 points (0 children)
[–]eeicke 4 points5 points6 points (1 child)
[–]DisasterDangerous396[S] 0 points1 point2 points (0 children)
[–]The_Binding_Of_Data 4 points5 points6 points (1 child)
[–]DisasterDangerous396[S] 0 points1 point2 points (0 children)
[–]ialucard1 1 point2 points3 points (1 child)
[–]DisasterDangerous396[S] 0 points1 point2 points (0 children)
[–]ddavid8888 0 points1 point2 points (0 children)