Imported Upstream version 4.2.2.10

Former-commit-id: 925376e1db46149d14f7949fcd7b08805ea8aba9
This commit is contained in:
Xamarin Public Jenkins
2015-12-18 19:40:30 -05:00
parent d11e8b35fd
commit 8cb7d04924
45 changed files with 399 additions and 122 deletions

View File

@ -36,7 +36,10 @@ namespace System
return false;
var from = Type.GetTypeCode (source);
switch (Type.GetTypeCode (target)) {
var to = Type.GetTypeCode (target);
if (from == to && source.IsPrimitive)
return true;
switch (to) {
case TypeCode.Char:
switch (from) {
case TypeCode.Byte:
@ -146,4 +149,4 @@ namespace System
return st == type || CanConvertPrimitive ((RuntimeType) st, type);
}
}
}
}