1114 {
1115 if (typeof(TOther) == typeof(byte))
1116 {
1118 }
1119 if (typeof(TOther) == typeof(char))
1120 {
1122 }
1123 if (typeof(TOther) == typeof(decimal))
1124 {
1125 return (
Half)(float)(decimal)(object)
value;
1126 }
1127 if (typeof(TOther) == typeof(double))
1128 {
1130 }
1131 if (typeof(TOther) == typeof(short))
1132 {
1134 }
1135 if (typeof(TOther) == typeof(int))
1136 {
1138 }
1139 if (typeof(TOther) == typeof(long))
1140 {
1142 }
1143 if (typeof(TOther) == typeof(IntPtr))
1144 {
1145 return (
Half)(nint)(IntPtr)(object)
value;
1146 }
1147 if (typeof(TOther) == typeof(sbyte))
1148 {
1150 }
1151 if (typeof(TOther) == typeof(float))
1152 {
1154 }
1155 if (typeof(TOther) == typeof(ushort))
1156 {
1157 return (
Half)(int)(ushort)(object)
value;
1158 }
1159 if (typeof(TOther) == typeof(uint))
1160 {
1162 }
1163 if (typeof(TOther) == typeof(ulong))
1164 {
1166 }
1167 if (typeof(TOther) == typeof(UIntPtr))
1168 {
1169 return (
Half)(nuint)(UIntPtr)(object)
value;
1170 }
1171 ThrowHelper.ThrowNotSupportedException();
1172 return default(
Half);
1173 }