I have a Visual-Studio Proj. in .NET Framework and need help fixing the "CS0120" error it throws up.
Basically I want to make an App which you just run and it will automatically, by pressing just one button, create and set up a Minecraft server, for that I had to convert a string in to Uri, I had problems with it but I was able to fix it at last, tho right after that it started to punch me down with a CS0120 error which I couldn't resolve.
9 Replies
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0120
If you want to use a non-static method of a class, you need an instance of that class
I've done it, tho it still gives me the same error
What's
minecraftServerJarUri
?Its the minecraftServerJarUrl, a string but coverted into a URI.
here's the code.
Just make it static then
Instead of re-instantiating the
Program
It worked, THANKS!
Didn't thimk it would be that simple, and I destroyed my head cus of that XD.