intとlongで計算したら結果はlongになる intとdoubleで計算したら結果はdoubleになる なんて話をよく聞くと思いますが、数値でも沢山の型があるC#というか.NETというかでどれとどれを計算したらどれになるんだっけ?っていうメモです。 計算 sbyte sbyteL = 0, sbyteR = 0; byte byteL = 0, byteR = 0; ... char charL = '0', charR = '0'; Console.WriteLine("sbyte + sbyte -> {0}", (sbyteL + sbyteR).GetType()); Console.WriteLine("sbyte + byte -> {0}", (sbyteL + byteR).GetType()); ... Console.WriteLine("char + char -