1
Answer

Easy static method question

This Dia

This Dia

18y
1.9k
1

Hello guys,
I am new to C# and I have encountered a problem.

I need to have a static method in a class that will return me the object of that class.
Something like this:
Class C
Public static void DoSomething() {}

and in the main
C c = DoSomething()

Can anybody help me please. What can I put instead of void in the method so I can have the solution?

Thank you
 
Answers (1)