[CSHARP-834] Implementations of IConvertible.ToType should handle conversion to type object Created: 02/Oct/13 Updated: 02/Apr/15 Resolved: 03/Oct/13 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.8.3 |
| Fix Version/s: | 1.9 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The current implementations of IConvertible.ToType do not handle conversion to type object. We were not expecting ToType to be called with a conversionType argument of type object (after all you can simply cast to object), but it turns out this is legal so we should support it. The following code snippet currently throws an InvalidCastException:
|
| Comments |
| Comment by auto [ 03/Oct/13 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@10gen.com'}Message: |