S
Sathyaish
I need help understanding this property. It totally escapes me, pun
intended.
The documentation says:
<DOCUMENTATION>
Summary
Gets a Boolean value that indicates whether the URI information used to
construct the current instance was escaped before the current instance
was created.
Property Value
true if the dontEscape parameter of the constructor for the current
instance was set to true ; otherwise, false.
</DOCUMENTATION>
I understood it as, if the Uri specified as the argument in the
constructor of this class is already URLEncoded, then this property is
set to True, and otherwise to false. So, I tried this code:
<CODE>
try
{
u = new Uri("http%3A%2F%2Fwww%2Esathyaish%2Ecom");
}
catch(Exception e)
{
Console.WriteLine(e.Message);
return;
}
Console.WriteLine("\nUserEscaped: " + u.UserEscaped);
</CODE>
I also tried two other URLs given below (not URL Encoded this time):
1. http://www.yahoo.com
2. http://discuss.joelonsoftware.com/?joel
The property always returns False. What's the deal?
intended.
The documentation says:
<DOCUMENTATION>
Summary
Gets a Boolean value that indicates whether the URI information used to
construct the current instance was escaped before the current instance
was created.
Property Value
true if the dontEscape parameter of the constructor for the current
instance was set to true ; otherwise, false.
</DOCUMENTATION>
I understood it as, if the Uri specified as the argument in the
constructor of this class is already URLEncoded, then this property is
set to True, and otherwise to false. So, I tried this code:
<CODE>
try
{
u = new Uri("http%3A%2F%2Fwww%2Esathyaish%2Ecom");
}
catch(Exception e)
{
Console.WriteLine(e.Message);
return;
}
Console.WriteLine("\nUserEscaped: " + u.UserEscaped);
</CODE>
I also tried two other URLs given below (not URL Encoded this time):
1. http://www.yahoo.com
2. http://discuss.joelonsoftware.com/?joel
The property always returns False. What's the deal?