+ 1
How can i fix this ?
i have tried a lot of things but it always gives the same error . how can i fix it? https://code.sololearn.com/cAO1NttSxs5Y/?ref=app
2 Respostas
+ 1
1) Remove the static keyword from GetInfo() method
2) Don't Console.WriteLine() GetInfo() because it doesn't return anything so just leave it as
number1.GetInfo();
Extra: Using string templating/interpolation would be MUCH better for printing out so many fields especially if you add more
Docs: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated
0
Thank you