c# - CIL 数据类型及其在 C# 中的等价物

标签 c# .net cil

CIL有一些指令比如ldc.r8 <float64 (num)>, ldc.r4 <float32 (num)>, ldc.i8 <int64 (num)>, ldc.i4.s <int8 (num)>将常量加载到堆栈中。

那么,在 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

另见 the data type summary .

关于c# - CIL 数据类型及其在 C# 中的等价物,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12882341/

相关文章:

c# - ASP.NET 中的 FluentNHibernate session 管理

c# - 如何将动态用作泛型?

c# - 在 C# 上使用 CreateFile 返回 isInvalid = true

c# - 无法将字符串转换为 int。来自 XML 元素的数据。 C#

c# - VS Code 指标如何计算

javascript - JS中获取400响应错误信息

.net - TrustAllCertificatesCallback 被忽略

c# - 在Application_Start上访问当前域名

cil - .NET 和输出文件扩展名

c# - 与其他结构相比,为什么 DateTime 的 GetHashCode() 方法编译方式不同?