Spaghetti Tom
Thursday, January 17, 2013
typeof Reflection comparisons in C#
Compare an instance to a type!
if (foo.GetType() == typeof(HiddenField)) {
if (foo.GetType().FullName == typeof(HiddenField).FullName) {
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment