Simple coding question (For loop not stopping properly)

I’m trying to make a function that hides characters from a users’ email. The function will explain everything.
My issue is that the loop isn’t stopping when I tell it to. If you call return; then the function should exit immediately but it’s not working in my case. Can anyone tell me why?

    string privateEmail(string email)
        //Skip the first 2 characters
        //The following characters will be replaced with '*'
        //This loop stops at the '@' symbol
        //return the string


        //Result should look like: em***

        for (int i = 2; i < email.Length; i++)
            if (email *== '@')*

return email;

email = email.Replace(email_, '');_

return “”;

Because email = email.Replace(email_, '*'); method is going to replace all occurrences of that character in the string. So what you can do is_
for(int i = 2; i < email.Length; i++)
_ if(email == ‘@’)_
* return email;*

_ email = email.Remove(i, 1).Insert(i, "");_