c# - How to check typeof parameters in method? -


how check typeof parameters in method code contracts?

i need check type argument in method

how about

public void mymethod(object parameter) {     if (parameter.gettype() == typeof(int32))     {         //do stuff     } } 

in continuation other question

class managercar : iblalba {     public void render(iviewtemplate template)     {         if (template.gettype() == typeof(carviewtemplate))         {             //do stuff         }     } } 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -