This is one of the most well-known statements from the Harry Potter universe, and it's a nice one. During his third year at Hogwarts, Harry overhears this little quip from the Weasley twins. He uses it later that year to scare off the ghosts who have been haunting him. The twins were being sarcastic when they said this. But since it's known as an "undertaking solemnly sworn," this statement can be used in other situations where someone needs to know you're being serious. For example, if you are talking to the police and want them to take you seriously then you could say, "I solemnly swear that I am not lying." This would be followed by your signature (or mark) on a piece of paper. So by saying this you are basically swearing on something sacred (in this case your honesty). This shows that you are being serious and that you don't want to lie about anything. This phrase is used quite often in books and movies. If you want to sound more professional or older then saying this phrase after making an oath will help.