A number of pitfalls attend the writing of dialogue that conveys information, whether in fiction or drama.
It can undermine character credibility, when one person tells another what he already knows.
It can sound flat, when the language slips from the loose and conversational into the persuasive mode of the essay or editorial.
Even when you finesse your way past these issues, the chunk of exposition may signal its purpose too heavily to the reader. As readers we crave information, but only to answer questions that we’ve already been made to feel a sense of curiosity about.
Mitigate this whenever possible by making the speaker a reluctant provider of information, who gives it up only after offering resistance. If you can turn the dialogue exchange into a victory for the scene’s viewpoint character, the emotional charge we get from that distracts from your turning of the structural gears.
Alternately, find another double purpose for the exchange. It might establish character, evoke a sense of place, or change the mood. The extra layer disguises your intent.
Or you can simply ensure that the information is riveting by presenting it in the form of a story or anecdote with a beginning, middle and end.