Throughout the entire first act of the play, Cleopatra discusses her fear of Caesar without knowing that she is, in fact, talking to Caesar himself. The audience is aware of Caesar's identity, an awareness that produces dramatic irony in passages such as the following:
CAESAR: Why? Are you afraid of the Romans?
CLEOPATRA: [very seriously] Oh, they would eat us if they caught us. They are barbarians. Their chief is called Julius Caesar. His father was a tiger and his mother a burning mountain; and his nose is like an elephant's trunk. [Caesar involuntarily rubs his nose.] They all have long noses, and ivory tusks, and little tails, and seven arms with a hundred arrows in each; and they live on human flesh.
On Shaw's part, it is an interesting choice to introduce both Caesar and Cleopatra to the audience—and to one another—in this context. Cleopatra lacks information that both Caesar and the audience are privy to, which emphasizes the youthful, innocent aspects of her character. Caesar, by comparison, appears older and wiser. The dramatic irony present throughout Act 1 draws attention the two characters' differing amounts of life experience, making it feel appropriate and natural when Caesar later takes Cleopatra under his wing.
In Act 3, Caesar Britannus hands Caesar a bag containing letters, written from Pompey's party to the Roman army of occupation in Alexandria. Caesar refuses to open the bag or read the letters, a decision that later leads to a moment of dramatic irony. He justifies his choice in the following manner:
Would you have me waste the next few years of my life proscribing and condemning men who will be my friends when I have proved that my friendship is worth more than Pompey's was—than Cato's is.
Immediately after making the above statement, Caesar throws the satchel into the sea. This entire interaction provides important insight into Caesar's character and moral values: he is a merciful man who understands human nature and believes in second chances. The mood in this passage is more serious and less comedic. The serious mood is almost instantly undermined when, later, in a moment of dramatic irony, Apollodorus reveals what actually happened to the satchel:
APOLLODORUS: Caesar: I cannot return. As I approached the lighthouse, some fool threw a great leathern bag into the sea. It broke the nose of my boat; and I had hardly time to get myself and my charge to shore before the poor little cockleshell sank.
CAESAR: I am sorry, Apollodorus. The fool shall be rebuked.
In this scene, Apollodorus is unaware of information that the audience is privy to: that Caesar himself was the one to throw the satchel into the ocean. This dramatic irony is made all the more potent by the fact that Caesar himself states that "the fool shall be rebuked." Despite making a serious and morally significant decision in the previous scene, Caesar acknowledges the humor and irony inherent in the situation, taking these things in stride. This moment is fundamental to the audience's understanding of Caesar's character.
In Act 5, Caesar alludes to his future murder, a real historical event that audience members would likely have been aware of. This creates a sense of dramatic irony and foreshadowing in the following passage, as the audience is privy to information that Caesar is not:
RUFIO: Caesar: I am loth to let you go to Rome without your shield. There are too many daggers there.
CAESAR: It matters not: I shall finish my life's work on my way back; and then I shall have lived long enough. Besides: I have always disliked the idea of dying: I had rather be killed. Farewell.
This passage also serves as an instance of foreshadowing, alluding to the abrupt, predetermined end to Caesar's life. Though Caesar is ostensibly unaware of his own death, one cannot help but feel in this scene that he has some knowledge of the role his murder plays in progressing the narrative of history. He asserts that he will finish his life's work on the way back to Rome, implying that his life's work is to go to his death. On a a similarly metatextual level, Rufio seems aware of the historical significance of Caesar's murder, referencing perfectly the method by which Caesar will soon be killed.
At the very end of Act 5, Apollodorus converses with Cleopatra as they watch Caesar depart for Rome. Apollodorus attempts to console Cleopatra about Caesar's departure in a moment of dramatic irony, foreshadowing future events that are fated to take place beyond the time frame of the play:
APOLLODORUS: [to Cleopatra] No tears, dearest Queen: they stab your servant to the heart. [Caesar] will return some day.
CLEOPATRA: I hope not. But I can't help crying, all the same.
As contemporaneous audiences would no doubt have known, Caesar did not ever return to Alexandria and will never see Cleopatra after the events of the play. In fact, he is stabbed in the back and dies in Rome not long after returning. Though Apollodorus makes this comment about stabbing to metaphorically explain his own emotional response to Cleopatra's sorrow, this comment is nonetheless followed by the statement, "[Caesar] will return some day." Taken together, these statements—along with Cleopatra's trite response of "I hope not" to the prospect of Caesar's return—foreshadow the Roman leader's tragic end. Neither Apollodorus nor Cleopatra are aware of the significance of their statements with regards to future events. Audience members who are familiar with history, however, will know where Caesar's story is headed and thus experience this final moment of Act 5 as dramatic irony.