1103 {
1104 if (typeof(TOther) == typeof(byte))
1105 {
1106 result = (int)(
byte)(object)
value;
1107 return true;
1108 }
1109 if (typeof(TOther) == typeof(char))
1110 {
1111 result = (int)(
char)(object)
value;
1112 return true;
1113 }
1114 if (typeof(TOther) == typeof(decimal))
1115 {
1116 result = (double)(decimal)(object)
value;
1117 return true;
1118 }
1119 if (typeof(TOther) == typeof(double))
1120 {
1121 result = (double)(
object)
value;
1122 return true;
1123 }
1124 if (typeof(TOther) == typeof(short))
1125 {
1127 return true;
1128 }
1129 if (typeof(TOther) == typeof(int))
1130 {
1131 result = (int)(
object)
value;
1132 return true;
1133 }
1134 if (typeof(TOther) == typeof(long))
1135 {
1136 result = (long)(
object)
value;
1137 return true;
1138 }
1139 if (typeof(TOther) == typeof(IntPtr))
1140 {
1141 result = (nint)(IntPtr)(object)
value;
1142 return true;
1143 }
1144 if (typeof(TOther) == typeof(sbyte))
1145 {
1146 result = (sbyte)(
object)
value;
1147 return true;
1148 }
1149 if (typeof(TOther) == typeof(float))
1150 {
1151 result = (float)(
object)
value;
1152 return true;
1153 }
1154 if (typeof(TOther) == typeof(ushort))
1155 {
1156 result = (int)(ushort)(object)
value;
1157 return true;
1158 }
1159 if (typeof(TOther) == typeof(uint))
1160 {
1161 result = (uint)(
object)
value;
1162 return true;
1163 }
1164 if (typeof(TOther) == typeof(ulong))
1165 {
1166 result = (ulong)(
object)
value;
1167 return true;
1168 }
1169 if (typeof(TOther) == typeof(UIntPtr))
1170 {
1172 return true;
1173 }
1174 ThrowHelper.ThrowNotSupportedException();
1175 result = 0.0;
1176 return false;
1177 }