2 Samuel 12:10-12

10 So now the sword will never be turned away from your family; because you have had no respect for me, and have taken the wife of Uriah the Hittite to be your wife.
11 The Lord says, From those of your family I will send evil against you, and before your very eyes I will take your wives and give them to your neighbour, and he will take your wives to his bed by the light of this sun.
12 You did it secretly; but I will do this thing before all Israel and in the light of the sun.

2 Samuel 12:10-12 Meaning and Commentary

INTRODUCTION TO SECOND SAMUEL 12

Nathan is sent to David to charge him with his sin, and convince him of it by a parable, 2Sa 12:1-6; which being accommodated and applied to David's case, brought him to a conviction and acknowledgment of it, and repentance for it, which was forgiven him, 2Sa 12:7-13; though he is told the child begotten in adultery should die, and it was quickly struck with sickness and died; and David's behaviour during its sickness and at its death is recorded, 2Sa 12:14-23; after which Solomon was born to him of the same woman, and had the name of Jedidiah given him by the Lord, which signifies the beloved of the Lord, and as a token of reconciliation, and a confirmation of his sin being forgiven him, 2Sa 12:24,25; and the chapter is concluded with the taking of the city of Rabbah, and the spoil in it, and the usage of the inhabitants of it, 2Sa 12:26-31.

The Bible in Basic English is in the public domain.