1178 {
1179 if (typeof(TOther) == typeof(byte))
1180 {
1182 }
1183 if (typeof(TOther) == typeof(char))
1184 {
1186 }
1187 if (typeof(TOther) == typeof(decimal))
1188 {
1189 return (
Half)(float)(decimal)(object)
value;
1190 }
1191 if (typeof(TOther) == typeof(double))
1192 {
1194 }
1195 if (typeof(TOther) == typeof(short))
1196 {
1198 }
1199 if (typeof(TOther) == typeof(int))
1200 {
1202 }
1203 if (typeof(TOther) == typeof(long))
1204 {
1206 }
1207 if (typeof(TOther) == typeof(IntPtr))
1208 {
1209 return (
Half)(nint)(IntPtr)(object)
value;
1210 }
1211 if (typeof(TOther) == typeof(sbyte))
1212 {
1214 }
1215 if (typeof(TOther) == typeof(float))
1216 {
1218 }
1219 if (typeof(TOther) == typeof(ushort))
1220 {
1221 return (
Half)(int)(ushort)(object)
value;
1222 }
1223 if (typeof(TOther) == typeof(uint))
1224 {
1226 }
1227 if (typeof(TOther) == typeof(ulong))
1228 {
1230 }
1231 if (typeof(TOther) == typeof(UIntPtr))
1232 {
1233 return (
Half)(nuint)(UIntPtr)(object)
value;
1234 }
1235 ThrowHelper.ThrowNotSupportedException();
1236 return default(
Half);
1237 }