Dickens uses dramatic irony early in the novel as a way of highlighting young David Copperfield’s innocence and gullibility. For example, when David travels alone to Salem House in Chapter 5, a waiter takes advantage of his good nature and ready willingness to believe everything he is told:
I replied that he would much oblige me by drinking [my ale], if he thought he could do it safely, but by no means otherwise. When he did throw his head back, and take it off quick, I had a horrible fear, I confess, of seeing him meet the fate of the lamented Mr Topsawyer, and fall lifeless on the carpet. But it didn’t hurt him. On the contrary, I thought he seemed the fresher for it.
The waiter starts by easily convincing David that someone came through the inn recently and dropped dead from drinking the ale. Only those who are used to it, the waiter claims, can drink it safely. He offers to dispose of the ale for David and moves on to giving reasons why he should eat every other part of the big meal that has been reserved for David.
By the time the waiter drinks the ale and is fine, the reader understands what David does not: this man is manipulating him to get a nice meal. The dramatic irony builds throughout the scene, as it becomes more and more obvious what the waiter is doing. This building dramatic irony makes David both the butt of the joke and also the object of the reader’s sympathy. He is either innocent or polite to the point of being pathetic. Anyone with sense and self-respect in David's place would insist on eating the meal himself, but poor young David clearly has neither of these. The scene is thus important to the arc of the novel as a Bildungsroman. It demonstrates how much growing up David will need to do, even at his young age, in order to survive in the world, let alone thrive.
Dickens uses situational irony to critique the practice of imprisoning debtors, something that happened to his own father. For example, in Chapter 11, the narrator writes of the Micawbers:
[...] they lived more comfortably in the prison than they had lived for a long while out of it.
The Micawbers are both comedic and tragic figures. They seem incompetent at managing their own affairs, to the point that they almost read as a cheap shot at Dickens's own father for mismanaging his money. Still, they are essentially good people who get caught in a system that makes it extraordinarily difficult for them to fix their own errors. Debtors, or people who owed money they could not or would not pay back, were regularly thrown in debtors’ prison in England until 1869. Debtors made up a huge percentage of inmates—over half, by some counts. Imprisoning debtors created a vicious cycle because it was next to impossible to make money to pay off debts while imprisoned. As is still the case today in many places, poverty and incarceration created the conditions for further poverty and incarceration.
Dickens himself faced the far-reaching social consequences of this system as a child. It was the life of Dickens's entire family, not only his father's life, that was disrupted by debtors' prison. The novel uses the Micawbers to explore the way debtors' prison affected whole families. After Mr. Micawber has been in debtors’ prison for a while, Mrs. Micawber moves the whole family there for cheapness and convenience. It is absurdly ironic that the quality of life in prison is better than the quality of life the Micawbers have enjoyed out of prison. Prison, an institution that is supposed to take people out of daily public life, might as well be the new site of public life if people are picking up to move there for a better life.
The irony is at once comic and tragic. Readers are left either in a state of deep sympathy for the Micawbers or shaking their heads at a system that is completely laughable. Dickens thus uses situational irony to agitate readers against a social system that he has a personal stake in challenging.
Verbal irony plays less of a role in David Copperfield than in some other Dickens's novels because there is no omniscient narrator to comment wryly on the characters from a remove. Nonetheless, verbal irony is one of Dickens's trademarks, and an example of it can be found in Chapter 34, when David finds his aunt in his apartment:
‘Let me draw the sofa here, or the easy chair, aunt,’ said I. ‘Why should you be so uncomfortable?’
‘Thank you, Trot,’ replied my aunt, ‘I prefer to sit upon my property.’ Here my aunt looked hard at Mrs Crupp, and observed, ‘We needn’t trouble you to wait, ma’am.’
Betsey Trotwood explicitly means that she would rather sit on her suitcase than on David's furniture. It is not that she is more comfortable on a suitcase than she would be on a couch, which is what David accepts as her meaning. What Betsey really means is the opposite: there is no saving her from discomfort in this situation. She prefers to be self-sufficient and rely exclusively on her own "property." Despite this preference, she is about to humble herself to ask David if she might move in with him since she has lost most of her own wealth. In fact, Betsey does seem to be sitting on practically all of her own property at once, at least what is available to her. She is supremely uncomfortable and would prefer not to be in David's apartment at all.
Betsey continues her verbal irony when she tells Mrs. Crupp, "We needn't trouble you to wait, ma'am." Betsey is embarrassed about the conversation she is about to start with David. David is renting from Mrs. Crupp, which means Mrs. Crupp is about to become Betsey's landlady, too. Betsey is used to being her own landlady, so this is a step down for her. She explicitly claims to be concerned about "troubling" Mrs. Crupp, but she is using this politeness to thinly veil a request to be left in privacy. Verbal irony often allows characters to insult one another without appearing outwardly rude. Here, Betsey uses it to put everyone else at ease about an awkward situation. She is proving herself to handle changes in fortune with discomfort but with stoic grace. She is only going to ask David for as much help as she must, and she is not going to become as morose about it as someone like Mrs. Micawber.
In Chapter 39, Uriah upsets Mr. Wickfield and claims that he is entitled to marry Agnes due to his upward mobility. In the morning he claims to have smoothed things over with Mr. Wickfield while also using a metaphor to suggest that he has already made sexual advances toward Agnes:
I obliged myself to say that I was glad he had made his apology.
‘Oh, to be sure!’ said Uriah. ‘When a person’s umble, you know, what’s an apology? So easy! I say! I suppose,’ with a jerk, ‘you have sometimes plucked a pear before it was ripe, Master Copperfield?’
‘I suppose I have,’ I replied.
‘I did that last night,’ said Uriah; ‘but it’ll ripen yet! It only wants attending to. I can wait!’
Uriah smacks his lips while David rides away in the coach. David might be taking Uriah literally, agreeing that he too has picked an actual pear before it was ripe. More likely, he means that he has counted on an opportunity before it was ensured.
As Uriah goes on, his words and demeanor make it clear that his meaning is more sinister. Agnes is the pear. He could mean that he "plucked" her by swearing that he was entitled to marry her, but he could also mean that he approached her sexually after everyone went to sleep. Agnes is not "ripe" yet because she is not married. If Uriah has indeed approached her sexually, it could mean that she will never be "ripe" for marriage to anyone else, according to restrictive Victorian social mores. As the reader has already seen with Emily, premarital sex can be damning for a Victorian woman and her family. Just as the Peggottys are left at the mercy of Steerforth's decision to marry Emily or toss her aside, Agnes and Mr. Wickfield may now be forced to beg for Uriah to marry Agnes.
Whether or not Uriah is using the metaphor in this crass sense, his "'umble apology" to Mr. Wickfield is laden with situational irony. According to manners, Uriah owed Mr. Wickfield an apology for upsetting him by claiming an inherent right to marry Agnes. In this sense, he has behaved honorably. But by behaving honorably toward Mr. Wickfield, Uriah has laid further groundwork for marrying Agnes after all. Rather than being shooed away, Uriah has secured for himself once more the chance to "wait" and "attend to" Agnes. This irony highlights one of the problems with the extreme importance placed on manners in Victorian society. The well-off Mr. Wickfield, good at recognizing politeness but not necessarily sincerity, is convinced by Uriah's performance of good manners and is thus more easily manipulated by him than if he did not care about manners.
In Chapter 45, Annie explains why she is glad she did not marry Jack Maldon, and her words stick with David for a reason he can't work out. There is dramatic irony in this moment because to both the reader and to the adult narrator, it is obvious why Annie's words resonate with him:
I pondered on those words, even while I was studiously attending to what followed, as if they had some particular interest, or some strange application that I could not divine. ‘There can be no disparity in marriage like unsuitability of mind and purpose’—‘no disparity in marriage like unsuitability of mind and purpose.’
It has been clear to the reader for some time that David and Dora are unsuited to one another, both in mind and purpose. David wanted a wife who could be his equal partner and who was talented at managing a household. This does not describe Dora, who struggles with housework and has recently asked David to refer to her as his "child-wife." David is all too happy to use this condescending name because he truly does not recognize other strengths Dora might bring to the partnership to equal his own. Dora, meanwhile, wanted a husband who would protect her from any and all upsets and who would provide her with riches. This does not describe David, who works for a modest income and regularly upsets Dora. David was attracted to Dora because she was like a charming doll he could play with, but that was never the "purpose" of marriage to him.
Despite their clear mismatch, David has not yet done enough self-reflection to realize his error in selecting Dora as his wife. This moment, when Annie's words stick with him, reveals that he is almost ready to admit it to himself. Still, he keeps himself in the dark a little longer by failing to apply Annie's wisdom to his own life. Doing so would require that he accept that he has behaved somewhat like Mr. Murdstone in his marriage to Dora. Additionally, it might require noticing the person in his life who actually would make a suitable wife: Agnes. If suitability of mind and purpose make for a good marriage, David has overlooked the person he ought to have married in favor of one he ought not to have married.