[Mono-list] Re: System.Convert.ChangeType possible bug.

Martin Garton martin@wrasse.demon.co.uk
Tue, 21 Sep 2004 22:52:49 +0100 (BST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--279708929-996961706-1095803569=:31932
Content-Type: TEXT/PLAIN; charset=US-ASCII


Hi,

I have looked further and it seems that if no conversion can be performed 
the unconverted object is simply returned instead of throwing an 
exception. I think this is wrong.

A simple fix (Works For Me) is attached.

Comments?

-- 
Martin Garton.


--279708929-996961706-1095803569=:31932
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="convert.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0409212252490.31932@wrasse.demon.co.uk>
Content-Description: 
Content-Disposition: attachment; filename="convert.patch"

SW5kZXg6IGNsYXNzL2NvcmxpYi9TeXN0ZW0vQ29udmVydC5jcw0KPT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9tb25vL21jcy9jbGFzcy9j
b3JsaWIvU3lzdGVtL0NvbnZlcnQuY3Msdg0KcmV0cmlldmluZyByZXZpc2lv
biAxLjYwDQpkaWZmIC11IC1yMS42MCBDb252ZXJ0LmNzDQotLS0gY2xhc3Mv
Y29ybGliL1N5c3RlbS9Db252ZXJ0LmNzCTkgU2VwIDIwMDQgMTQ6NDA6NDkg
LTAwMDAJMS42MA0KKysrIGNsYXNzL2NvcmxpYi9TeXN0ZW0vQ29udmVydC5j
cwkyMSBTZXAgMjAwNCAyMTo0ODowOSAtMDAwMA0KQEAgLTI3ODgsMTIgKzI3
ODgsNyBAQA0KIAkJCQllbHNlIGlmIChjb252ZXJzaW9uVHlwZSA9PSBjb252
ZXJzaW9uVGFibGVbMThdKSAvLyAxOCBUeXBlQ29kZS5TdHJpbmcNDQogCQkJ
CQlyZXR1cm4gKG9iamVjdCk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