When trying to call this function in my code i get the error in the title. Also Operator \'+=\' cannot be applied to the operands of type \'int\' and \'T\'
p
Or another way (object cast is necessary not typo)
t += (int)(object)value;
Or use dynamic, by using dynamic you can do more, such as implicit casts
Or use Int32 - Int32 and int are both struct internally. No performance loss