Charles Darnay is on trial for treason in Book 2, Chapter 3 of A Tale of Two Cities. The charges against Charles Darney hinge on the witness testimony of John Barsard and Robert Cly, who it turns out are actually agents of the French government. They are accusing Darnay of passing secret messages to the French as well as sympathizing with the Americans. These are serious charges which would bring the death penalty if proven.
Sitting in the courtroom, Sydney Carton knows that the accusations of the witnesses are false. He is also particularly stricken by Darnay's physical resemblance to himself. He passes a note to Darnay's lawyer, Stryver, with an idea of how to discredit the two witnesses for the prosecution. In cross-examination, Stryver asks the witnesses if they can be sure that the man they saw delivering the clandestine messages was not someone else. The witness says he is sure it was Darnay. Then Stryver points at Carton and asks the witness to, "Look well upon that gentleman (Carton), my learned friend there...and then look well upon the prisoner (Darnay). How say you? Are they very like each other?" Everyone in the room is shocked by the resemblance of the two men. It casts enough doubt into the minds of the Jury that there is no way that Barsard and Cly could be certain that they had actually recognized Darnay.
This episode also establishes the physical similarities between Carton and Darnay which will be crucial during the dramatic conclusion of the story.