I am using Activator.CreateInstance to create an object from a Dll at run time,
If the object is an Interface I get an error and I don’t want to create an object of that interface.
So my question is there any option to check if an object is Interface and not class?
Do you mean you want to check if a type is an interface type? If so, that’s easy:
If you mean “is this object of a type which implements any interfaces” it’s still feasible, but harder and probably less useful…