1050 {
1051 if (typeof(TOther) == typeof(byte))
1052 {
1054 }
1055 if (typeof(TOther) == typeof(char))
1056 {
1058 }
1059 if (typeof(TOther) == typeof(decimal))
1060 {
1061 return (
Half)(float)(decimal)(object)
value;
1062 }
1063 if (typeof(TOther) == typeof(double))
1064 {
1066 }
1067 if (typeof(TOther) == typeof(short))
1068 {
1070 }
1071 if (typeof(TOther) == typeof(int))
1072 {
1074 }
1075 if (typeof(TOther) == typeof(long))
1076 {
1078 }
1079 if (typeof(TOther) == typeof(IntPtr))
1080 {
1081 return (
Half)(nint)(IntPtr)(object)
value;
1082 }
1083 if (typeof(TOther) == typeof(sbyte))
1084 {
1086 }
1087 if (typeof(TOther) == typeof(float))
1088 {
1090 }
1091 if (typeof(TOther) == typeof(ushort))
1092 {
1093 return (
Half)(int)(ushort)(object)
value;
1094 }
1095 if (typeof(TOther) == typeof(uint))
1096 {
1098 }
1099 if (typeof(TOther) == typeof(ulong))
1100 {
1102 }
1103 if (typeof(TOther) == typeof(UIntPtr))
1104 {
1105 return (
Half)(nuint)(UIntPtr)(object)
value;
1106 }
1107 ThrowHelper.ThrowNotSupportedException();
1108 return default(
Half);
1109 }