Warum verwendet Int32
int
in seiner source code? Ist Int32
gleich int
in C#? Was ist der ursprüngliche Quellcode für int
? Ich bin verwirrt ..Warum benutzt `Int32`` int` im Quellcode?
[Serializable]
[System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
[System.Runtime.InteropServices.ComVisible(true)]
#if GENERICS_WORK
public struct Int32 : IComparable, IFormattable, IConvertible
, IComparable<Int32>, IEquatable<Int32>
/// , IArithmetic<Int32>
#else
public struct Int32 : IComparable, IFormattable, IConvertible
#endif
{
internal int m_value; // Here????
public const int MaxValue = 0x7fffffff;
public const int MinValue = unchecked((int)0x80000000);
...
}
dort das gleiche Problem ist auch zwischen Boolean
und bool
.
Int32 ist 'struct'.It contained Methoden und stuffs für die Manipulation von int, int ist System definierten Datentyp. –
Das ist * der ursprüngliche Quellcode für 'int'. Einige der tatsächlichen inneren Abläufe sind Teil des Compilers und der Laufzeit, aber insofern es Quellcode gibt, das ist der Quellcode. – hvd
Vielleicht ein Duplikat: http://stackoverflow.com/questions/16113850/if-int32-is-just-an-aliass-for-in-how-can-the-int32-class-use-an-int Nur verwandt : http://stackoverflow.com/questions/18018281/regarding-primitive-data-types-in-c-sharp –