I'm having a general class in that class i've written one method which should accept the object
class's object as parameter.
the function is as follows-
protected void AddNewForm(object o )
{
try
{
o.Show();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
and i'm calling this function from another classes . but when i call this function as-
Contact objContact=new Contact();
AddNewForm(objContact);
but it shows the error in that function. the error as-
'object' does not contain a definition for 'Show' and no extension method 'Show' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
How to implement late binding in C# windows application?
thanks.