In Act 1, Scene 2 of Hamlet, Hamlet has a conversation with Claudius and Gertrude. One example of verbal irony occurs when Hamlet says "Not so, my lord. I am too much i' the sun."
In this scene, Claudius asks him why he continues to be so gloomy. (He specifically says, "How is it that the clouds still hang on you?")
Hamlet's reply to Claudius' question is ironic. He is not "in the sun" -- first of all, he is in the castle; secondly, he is depressed and sad.