List Info

Thread: Convert.ChangeType wrapper that handles nullable types




Convert.ChangeType wrapper that handles nullable types
user name
2006-05-31 16:10:56
The .NET Framework's Convert.ChangeType method doesn't
handle nullables.
If you try to use this method to perform a late-bound
conversion to a
nullable type, it throws an InvalidCastException. I've
written a wrapper
for Convert.ChangeType that gets around this problem.

Convert.ChangeType wrapper that handles nullable types
http://weblogs.asp.net/pjohnson/archive/2006/05/19
/447154.aspx

--Peter

                                                         __


------------------------------------------------------------
-
This e-mail and any attachments may be confidential or
legally privileged. If you received this message in error or
are not the intended recipient, you should destroy the
e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing disclosing or using
any information contained herein.  Please inform us of the
erroneous delivery by return e-mail. Thank you for your
cooperation.
------------------------------------------------------------
-

FE01


Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )