code_junkie

In C#, how can I downcast a previously upcasted object without knowing it's type?

Nov 12th, 2011
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. public void Execute(ICommand command);
  2.  
  3. Handle(command as command.GetType()); // this obviously does not compile
Add Comment
Please, Sign In to add comment