Here is how you might do it with generics:
public T GetAnything<T>()
{
T t = //Code to create instance
return t;
}
But you would have to know what type you wanted returned at design time. And that would mean that you could just call a different method for each creation…