简体   繁体   English

CIL数据类型以及C#中的等效数据类型

[英]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. CIL具有一些已ldc.r8 <float64 (num)>, ldc.r4 <float32 (num)>, ldc.i8 <int64 (num)>, ldc.i4.s <int8 (num)>指令,例如ldc.r8 <float64 (num)>, ldc.r4 <float32 (num)>, ldc.i8 <int64 (num)>, ldc.i4.s <int8 (num)>常量进入堆栈。

Well, what are the equivalent for these data types ( int32, int64, float32, float64 ) in C#? 那么,C#中这些数据类型( int32, int64, float32, float64 )的等效项是什么?

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 . 另请参见数据类型摘要

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM