You'd recall times when you expected a certain outcome but what occurred was totally unexpected and contrary to what you had expected. This irony when the outcome is opposite to what is expected is called situational irony.
One of the examples of this as a literary device is in Guy de Maupassant's The Necklace, where the character Mathilde's borrowed diamond necklace is lost and Mathilde and her husband toil away a decade to replace the lost necklace only to later learn that the necklace she had borrowed was fake and not made of real diamonds.
Comments