Skip to content

Instantly share code, notes, and snippets.

@RookieOne
Created January 27, 2010 17:01
Show Gist options
  • Save RookieOne/287998 to your computer and use it in GitHub Desktop.
Save RookieOne/287998 to your computer and use it in GitHub Desktop.
/// <summary>
/// Returns true if the object is the type of T
/// </summary>
public static bool IsTypeOf<T>(this object o)
{
return o.GetType() == typeof (T);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment