I'm working through the Pro ASP.NET MVC Framework book by Apress (which is great, btw) and it's in C# although we mostly work in VB so I'm "translating" the examples along the way. So far so good but I ran into something that has thrown me.
Long story short we need to validate that the string the user gave us as an email address. This returns true in C#:
Console.WriteLine(System.Text.RegularExpressions.Regex.IsMatch("Me@me.com", ".+\\@.+\\..+"));
But this returns false in VB:
Console.WriteLine(System.Text.RegularExpressions.Regex.IsMatch("Me@me.com", ".+\\@.+\\..+"))
I'm sure I'm missing something small but it's giving me heartburn. Thanks in advance for any help.
Long story short we need to validate that the string the user gave us as an email address. This returns true in C#:
Console.WriteLine(System.Text.RegularExpressions.Regex.IsMatch("Me@me.com", ".+\\@.+\\..+"));
But this returns false in VB:
Console.WriteLine(System.Text.RegularExpressions.Regex.IsMatch("Me@me.com", ".+\\@.+\\..+"))
I'm sure I'm missing something small but it's giving me heartburn. Thanks in advance for any help.
Last edited: