I need to design a method that can potentially take as a parameter an object, if it doesn't then the method has to create a new object by itself.
Is this a good way to do it?
public void Method1(int companyId, int userId, int clientId)
{
Method1(null, companyId, userId, clientId);
}
public void Method1(SpecialObject o, int companyId)
{
if(o == null)
o = new SpecialObject(userId, clientId);
}