I have an extension method that takes a parameter T. This parameter is a numeric type, one of the following: byte, short, int, and long.
I need to check if it is T0. How can this be done?
public static void WriteFlaggedValue<T>(this OutPacket outPacket, uint flag, T value, ref uint outputFlag) where T : struct,
IComparable,
IComparable<T>,
IConvertible,
IEquatable<T>,
IFormattable
{
if (value == 0)
{
}
}
source
share