Closed irkush closed 10 years ago
Creating new objects just to compare types is not effective. ( And also not the C# way of life. )
Better to use:
var specificObject = generalObject as MySpecificObject; if(specificObject != null) { // Do something awesome with my typesafe object. }
Or even better, create an abstraction that doesn't need type casting. :-)
Solved in b09f10fbf80d8b0f4db01071e08ea83c72e3c4e0
Creating new objects just to compare types is not effective. ( And also not the C# way of life. )
Better to use: