Very important question about The Good Wife

If they weren’t married, it wouldn’t have been an ‘affair’? My only question was whether Diane had known about it. The impression that I had when she stood up and left court is that she hadn’t.