(55) باب بَيَانِ حُكْمِ عَمَلِ الْكَافِرِ إِذَا أَسْلَمَ بَعْدَهُ
It is narrate on the authority of Hakim b. Hizam:
I said: Messenger of Allah, I did so some of the deeds in the state of ignorance. (One of the transmitters Hisham b. Urwa explained them as acts of piety. Upon this the Messenger, of Allah remarked: You have embraced Islam with all the previous acts of virtue. I said: By God, I would leave nothing undone in Islam the like of which I did in the state of ignorance.
Reference: Sahih Muslim 123 c
In-book reference: Book 1, Hadith 232
USC-MSA web (English) reference(deprecated numbering scheme): Book 1, Hadith 224
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.