C# 什么是 CLR 类?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9408832/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is a CLR class?
提问by Ratnesh Chandna
I googled CLR and found out what it is from wikipedia, but I wanted to know what a CLR class or more specifically a CLR entity type is (especially in ASP.NET).
我用谷歌搜索 CLR 并从维基百科中找到了它,但我想知道 CLR 类或更具体地说是 CLR 实体类型是什么(尤其是在 ASP.NET 中)。
采纳答案by manojlds
You are probably talking about CLR objects / POCO objects - Plain Old CLR objects.
您可能在谈论 CLR 对象/POCO 对象——Plain Old CLR 对象。
Look here: POCO vs DTO
看这里:POCO 与 DTO
Look here about working with POCO entities - Working with POCO Entities
在此处查看有关使用 POCO 实体的信息 -使用 POCO 实体
回答by Pranay Rana
CLR is not class. The Common Language Runtime (CLR) is the virtual machine component of Microsoft's .NET framework . This runtime environment in .NET Framework is known as Common Language Runtime (CLR).
CLR 不是类。公共语言运行时 (CLR) 是 Microsoft .NET 框架的虚拟机组件。.NET Framework 中的此运行时环境称为公共语言运行时 (CLR)。
image from wiki which explain what clr can do
来自维基的图像解释了 clr 可以做什么


CLR provides the following benefits for developers:
CLR 为开发人员提供了以下好处:
- Vastly simplified development.
- Seamless integration of code written in various languages.
- Evidence-based security with code identity.
- Assembly-based deployment that eliminates DLL Hell.
- Side-by-side versioning of reusable components.
- Code reuse through implementation inheritance.
- Automatic object lifetime management.
- Code access security.
- Cross Language Integration.
- Self describing objects.
- 大大简化了开发。
- 无缝集成各种语言编写的代码。
- 具有代码身份的基于证据的安全性。
- 基于程序集的部署,消除了 DLL 地狱。
- 可重用组件的并行版本控制。
- 通过实现继承实现代码重用。
- 自动对象生命周期管理。
- 代码访问安全。
- 跨语言集成。
- 自描述对象。
Read more : http://www.codeguru.com/forum/showthread.php?t=369619
回答by base2
CLR refers to Common Language Runtime, while class refers to a strongly typed data instance. The CLR is responsible for amongst many other things, managing the memory of your class instances.
CLR 是指公共语言运行时,而类是指强类型数据实例。CLR 负责管理类实例的内存等许多其他事情。
回答by Ali Issa
CLR is Common Language Runtime not a class.
CLR 是公共语言运行时而不是一个类。
The Common Language Runtime (CLR) is the virtual machine component of Microsoft's .NET framework and is responsible for managing the execution of .NET programs. In a process known as just-in-time (JIT) compilation, the CLR compiles the intermediate language code known as CIL into the machine instructions that in turn are executed by the computer's CPU. The CLR provides additional services including memory management, type safety and exception handling. All programs written for the .NET framework, regardless of programming language, are executed by the CLR. It provides exception handling, Garbage collection and thread management.
公共语言运行时 (CLR) 是 Microsoft .NET 框架的虚拟机组件,负责管理 .NET 程序的执行。在称为即时 (JIT) 编译的过程中,CLR 将称为 CIL 的中间语言代码编译成机器指令,然后由计算机的 CPU 执行。CLR 提供额外的服务,包括内存管理、类型安全和异常处理。所有为 .NET 框架编写的程序,无论使用何种编程语言,都由 CLR 执行。它提供异常处理、垃圾收集和线程管理。
Check this link
检查此链接

