Hi everyone,
I have a method in which I'm doing a check to see if the current object in a loop is the same type as a type I pass into the method.
At first I was passing the type into the method as a string and then using:
item.GetType().ToString().Equals(myType);
What I'd really prefer to do is use the is
keyword to do:
item is myType
The problem I'm having is passing in myType
to the method. Do I need to use some kind of funky generics type or something? What type do I pass in a reference ot a type as?