[Mono-bugs] [Bug 539727] XAttribute initialized with boolean value cannot be round-tripped
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Sep 17 10:47:26 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=539727
User dmitchell at logos.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=539727#c2
--- Comment #2 from David Mitchell <dmitchell at logos.com> 2009-09-17 08:47:23 MDT ---
Here's a sample run from the C# shell:
ws1096:~ dmitchell$ csharp -r:System.Xml.Linq
Mono C# Shell, type "help;" for help
Enter statements below.
csharp> using System.Xml.Linq;
csharp> var attribute = new XAttribute("blah", true);
csharp> attribute.Value;
"True"
csharp> (bool) attribute;
System.FormatException: True is not a valid boolean value
at System.Xml.XmlConvert.ToBoolean (System.String s) [0x00000]
at System.Xml.Linq.XAttribute.op_Explicit (System.Xml.Linq.XAttribute
attribute) [0x00000]
at Class2.Host (System.Object& $retval) [0x00000]
at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object&
result, System.Boolean& result_set) [0x00000]
at Mono.CSharpShell.Evaluate (System.String input) [0x00000]
csharp> attribute = new XAttribute("blah", "true");
blah="true"
csharp> attribute.Value;
"true"
csharp> (bool) attribute;
true
csharp> quit;
null
Entering similar statements into LinqPad (or something like it) on Windows will
yield the results I listed in the expected results.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list