c# - How to access a function within a namespace -


please facing problem while accessing function within class inside namespace in c#.

the format know follows: namespace.classname.functionname();

however, above method reporting me following error:

an object reference required non-static field, method or property "namespace.classname.functionname()".

you need declare instance of class contains function

namespace.classname yourclass = new namespace.classname(); 

then can use function follows

yourclass.functionname(); 

if want able use function without declaring instance of class needs static funciton.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -