Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

bug in System.Uri class?

$
0
0
I am trying to write a quick and dirty email client for windows app store but it crashes on craigslist reply links.

craigslist uses %40 instead of @ sign.

here is some simple code to repeat problem:

private void button1_Click(object sender, EventArgs e)
{
    System.Uri u1 = new Uri(@"mailto:bob@ms.com");  // ok so far
    System.Uri u2 = new Uri(@"http://somewhere.foo/profile/username%40somewhere.foo"); // still ok
    System.Uri u3 = new Uri(@"mailto:bob%40ms.com");  // crash here
            
}
 
Actual code on pastebin.com/tAmwT1Kq

crash on line 44

Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>