if (object is IBlah)
or
IBlah myTest = originalObject as IBlah
if (myTest != null)
More Related Contents:
- How to determine if a type implements an interface with C# reflection
- Implementations of interface through Reflection
- How can I write a generic container class that implements a given interface in C#?
- Reflection – get attribute name and value on property
- Can I use reflection to inspect the code in a method?
- Get name of property as a string
- Change Attribute’s parameter at runtime
- Mapping object to dictionary and vice versa
- How do I get all instances of all loaded types that implement a given interface?
- Reflection – Getting the generic arguments from a System.Type instance
- C# getting its own class name
- Why can’t C# interfaces contain fields?
- Using Case/Switch and GetType to determine the object [duplicate]
- How do you get a variable’s name as it was physically typed in its declaration? [duplicate]
- Why Explicit Implementation of a Interface can not be public?
- When should I choose inheritance over an interface when designing C# class libraries? [closed]
- ‘casting’ with reflection
- Get member to which attribute was applied from inside attribute constructor?
- Is there a way to “override” a method with reflection?
- Is there a way to force a C# class to implement certain static functions?
- Non Public Members for C# Interfaces [closed]
- Can I get parameter names/values procedurally from the currently executing function?
- Dynamically invoking any function by passing function name as string
- How can I get the correct text definition of a generic type using reflection?
- How do I check if a type provides a parameterless constructor?
- How can I tell if a C# method is async/await via reflection?
- how to get both fields and properties in single call via reflection?
- Find methods that have custom attribute using reflection
- Why is the use of reflection in .NET recommended?
- How to call an explicitly implemented interface-method on the base class