Here's a sample of what you ask for (type check can be added in last line to properly handle invalid cast exception to be more user-friendly):
public Action
May be you can give more details about the task though, because right now it looks a bit odd.