Hi All, I want to create a method which will take some base type as a parameter and compares and check if it is derived type and return the derived type based on that. For Example:
Class A : IBase
Class B : IBase
My method:
Public IBase GetData(IBase type)
{
If type is A then
{
//do smthing
return A
}
If type is B
{
//do smthing
return B
}
}
Please help.....