Primitive Typen in .net
In .net AIUIint
ist nur syntaktischer Zucker fürSystem.Int32
, die einstruct
.
csharp> typeof(System.Int32).IsPrimitive
true
csharp> typeof(System.Int32).Equals(typeof(int))
true
Ich sehe in der Quelle:
https://github.com/mono/mono/blob/master/mcs/class/corlib/System/Int32.cs http://referencesource.microsoft.com/#mscorlib/system/int32.cs
DasSystem.Int32
wird nur mit Bezug auf ein Mitglied definiertm_value
das ist selbst einint
- Wie funktioniert das? Sicher definieren wirint
in bezug auf sich selbst? Wie vermeiden wir dann eine zirkuläre Definition?