I have written a code to validate a string.but i am getting an error in the 3rd sentence as "the name "NullToString"does not exist in the current context"...can anyone help me out...

public static bool isEmail(string inputEmail)
            inputEmail = NulltoString(inputEmail);
            string strRegex = @"^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}" +
            @"\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\" +
            Regex re = new Regex(strRegex);
            if (re.IsMatch(inputEmail))
                return (true);
                return (false);

Lusiphur 185

Should be a Discussion Topic instead of a Code Snippet... other than that tho, on my way out the door and hopefully someone else can help you out :)

nick.crane 342

Your function is declared static.
Is NulltoString also static?