[Mono-dev] Wrong return value for RegistryKey.ToString(): Reason? or Can I fix?
Robert Jordan
robertj at gmx.net
Mon Feb 25 17:01:36 EST 2008
Robert Jordan wrote:
> Justin Cherniak wrote:
>> For some reason RegistryKey.ToString() on Mono does not produce the same
>> value as on .NET. When running a program under windows, Mono returns the
>> keyname + a handle value when calling ToString(). Under .NET, it just
>> returns the keyname. I looked through the source and the offending line
>> seems to be:
>> IntPtr handle = GetHandle(rkey);
>> return String.Format("{0} [0x{1:X}]", rkey.Name, handle.ToInt32
>> ());
>>
>> I'm just curious if there is a reason for this or if I can commit a fix. I
>> think its worth noting that UnixRegistryApi returns the "proper" value, so
>> I'm unclear why the windows implementation would not.
>
> It's for MS.NET 1.1 compatibility.
This is now fixed in SVN. Thanks!
Robert
More information about the Mono-devel-list
mailing list