C
C#

I have a Visual-Studio Proj. in .NET Framework and need help fixing the "CS0120" error it throws up.

I have a Visual-Studio Proj. in .NET Framework and need help fixing the "CS0120" error it throws up.

LLordoToasty11/19/2023
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.
AAngius11/19/2023
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
LLordoToasty11/19/2023
No description
LLordoToasty11/19/2023
I've done it, tho it still gives me the same error
AAngius11/19/2023
What's minecraftServerJarUri?
LLordoToasty11/19/2023
Its the minecraftServerJarUrl, a string but coverted into a URI.
LLordoToasty11/19/2023
LLordoToasty11/19/2023
here's the code.
AAngius11/19/2023
Just make it static then Instead of re-instantiating the Program
LLordoToasty11/19/2023
It worked, THANKS! Didn't thimk it would be that simple, and I destroyed my head cus of that XD.

Looking for more? Join the community!

C
C#

I have a Visual-Studio Proj. in .NET Framework and need help fixing the "CS0120" error it throws up.

Join Server
Want results from more Discord servers?
Add your server
Recommended Posts
please help!!! (winforms c#)Does anyone know how can i make the user move the last drawn shape on a picturebox (the picture box WPF ScrollViewer issuesHello, I have the problem that the scrollviewer in C# (WPF) does not work properly. I haven't define✅ Quick - Unity "using" directiveReally quick question guys, when trying to use methods from other scripts in Unity, let's say the ot✅ .Split() Returning Spaces Between Words in String[]Hi. I have an string array `string[] strArr` of words in format `[word1, word2]` and so on - just a I want to compile a program myself with less filesI was working on a open source project, and I want to compile the program myself so I setup a github✅ Finding Processes but it displays as invisibleSo I am making a system monitor, and I ran into a problem where when I click the button to display t✅ Getting artifact from GitHub Repo ends in SSL_ERROR_SSLHello guys, working on a console app to more or less download artifacts from our private GitHub Repo✅ DB ErrorHey guys, I am working on a project and I am trying to connect it to a DB. I am following the instruCalculate Field Offset Based On Members' NameI'd like to know if the offset calculation is correct. the input used is as follows```cs private coFollowing a video to create power ups, but its not picking them up and I dont know why.Heres the code. I dont know whats wrong with it, from what I can tell its exactly the same as the vConverting int to double to output with decimalsHello again! i got a little problem with converting int to double, i dont get it to output the decimDb ConnectionGood afternoon guys, I need some help setting up the database connection for my project. I have thCan't read property in code behind```cs @page "/weather" @attribute [StreamRendering] <PageTitle>Weather</PageTitle> <h1>Weather</h1RabbitMQ starting service issuePlease guys I had `RabbitMQ` running fine, but after restarting my computer the RabbitMQ won't be stException Unhandled : Could not load file or assembly 'Serilog.Extensions.HostingWhen I run my application, this exception is thrown even before the start of debugging. System.IO.Figot this code that i wrote the get all score and print end score but i didnt read right help meexem is 40% assigments is 30% and participation is 30%Assistance regarding deciding on what to use.Hello there, I want to port one of my macOS apps to a native windows app and would like to ask whichHelp deciding Next.js/Node.js vs .NET API back-endHello. I really want to use .NET as my API back-end for a practice app I'm building. However, I dohow do i make it so when i press it this happens and if i do it again another thing happensive made a code in winforms so when i press with my left mouse button it hides everything, how do i Can't access object attributes using X.PagedListI have a search field that returns a list of movies. It works fine if I reference the model as @Movi