+ Start a Discussion
monika sdfcmonika sdfc 

how to call a method with parameter Sobject

i have a method 
public void Genericobject(Sobject obj)
{
----
}

How to call this method?
Well i am calling like this 
a.Genericobject(Account acc)

Thanks in advance
        but an error
expecting a right parentheses, found 'acc'                   
 
suresh dupadasuresh dupada
a.Genericobject(new Account());
or
Account acc=new Account();
a.Genericobject(acc);