Type of delegate?

  • Thread starter Thread starter Jon Shemitz
  • Start date Start date
J

Jon Shemitz

Imagine you have a Type value - how can you tell if it's a delegate?
If it's NOT a class, a struct, an enum, or an interface?
 
Brock said:
Type t = GetDelegateType();
if (typeof(Delegate).IsAssignableFrom(t))
{
// Yes, Jim we have a delegate.... :)
}

Yes, thanks, that's what I came up with soon after posting. I was
expecting something like IsClass and IsEnum ....
 
Back
Top