T
Tom Cabanski
We have found that the Equals method of the Uri class
works as expected but that the "==" operator does not.
For example, here's a little console application:
using System;
namespace UriEqualsBug
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Uri u1 = new Uri
("http://tom/foo.xml");
Uri u2 = new Uri
("http://tom/foo.xml");
Console.WriteLine("The two
instances are equal using the equals method {0}",
u1.Equals(u2));
Console.WriteLine("The two
instances are equal using the == operator {0}", u1 == u2);
}
}
}
One would expect the output to be true for both
comparisons. However, we get true from the u1.Equals(u2)
and false from u1 == u2. Any ideas? Is this a framework
bug?
We are using the .NET framework 1.1.4322.
works as expected but that the "==" operator does not.
For example, here's a little console application:
using System;
namespace UriEqualsBug
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Uri u1 = new Uri
("http://tom/foo.xml");
Uri u2 = new Uri
("http://tom/foo.xml");
Console.WriteLine("The two
instances are equal using the equals method {0}",
u1.Equals(u2));
Console.WriteLine("The two
instances are equal using the == operator {0}", u1 == u2);
}
}
}
One would expect the output to be true for both
comparisons. However, we get true from the u1.Equals(u2)
and false from u1 == u2. Any ideas? Is this a framework
bug?
We are using the .NET framework 1.1.4322.