什么是FEATURE_PAL编译器指令是指在.NET 4源$ C ​​$ C [英] What is FEATURE_PAL compiler directive means in .net 4 source code

查看:145
本文介绍了什么是FEATURE_PAL编译器指令是指在.NET 4源$ C ​​$ C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题的理解FEATURE_PAL编译指令是指在.NET 4.0中源$ C ​​$ C什么。它几乎是用在访问非托管code每类。

I am having problem with understanding what FEATURE_PAL compiler directive means in .net 4.0 source code. It is used almost in every class that access unmanaged code.

推荐答案

PAL =平台适配层。这是第一个,也是最重要的CLR的细节,从操作系统实现绝缘的。你的确看到它用在源$ C ​​$ c中的参考源副本的.NET 4类。它出现在任何code,有对底层操作系统实现一个很强的依赖性,这种绕过code,因为它不能在一个操作系统Windows以外的工作。

PAL = Platform Adaptation Layer. It is first and foremost a detail of the CLR, insulating it from the operating system implementation. You'll indeed see it used in the Reference Source copy of the source code for the .NET 4 classes. It appears in any code that has a strong dependency on the underlying operating system implementation, bypassing such code since it cannot work on an operating system other than Windows.

这篇关于什么是FEATURE_PAL编译器指令是指在.NET 4源$ C ​​$ C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆