My generic method is this

```
public static class AppContainerInstaller
{
    public static IMessageHandler<T> Resolve<T>() 
    {
        return _container.Resolve<IMessageHandler<T>>();
    }
}

```

I am trying to call this generic method from a different class

```
public static string ProcessMessage(IMessage message)
{
    messageHandler = AppContainerInstaller.Resolve<message.GetType()>();
    // THe previous line throws an error.
    return messageHandler.Handle(message);
}

```

Can anyone tell me how to pass the type of message to a generic method?