Alan Coromano
Alan Coromano

Reputation: 26008

CIL data types and equivalent of them in C#

CIL has some instructions such as ldc.r8 <float64 (num)>, ldc.r4 <float32 (num)>, ldc.i8 <int64 (num)>, ldc.i4.s <int8 (num)> that are load constants into the stack.

Well, what are the equivalent for these data types (int32, int64, float32, float64) in C#?

Upvotes: 2

Views: 991

Answers (1)

driis
driis

Reputation: 164291

C# type     CIL type    .NET Framework type
============================================
short       int16       System.Int16
int         int32       System.Int32
long        int64       System.Int64

float       float32     System.Single
double      float64     System.Double

See also the data type summary.

Upvotes: 8

Related Questions