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 - sscanf() double showing zeros -

command line - Python: find current directory of remote "cmd.exe" processes -

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -