我为什么要编写符合CLS的代码? [英] Why should I write CLS compliant code?

查看:252
本文介绍了我为什么要编写符合CLS的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了很多关于CLS遵从页

I've found a lot of pages about CLS compliance.

我了解,CLS遵从性:

I've understood that CLS compliance:

  • Is a way to guarantee different assembly compatibility.
  • Is a way to declare the high security code

许多peolple写道:如果你写的代码,你应该把它写符合CLS。
,而据我可以阅读,没有理由要使用通用软件CLS遵从性。

Many peolple write that "if you write code, you should write it CLS compliant." But as far I can read, there is no reason to use CLS compliance in generic software.

我说得对,还是我错过了什么?

Am I right, or did I miss something?

推荐答案

如果你写一个库或框架,这是有道理的,以确保您的图书馆可以从任何CLR语言被使用。

If you write a library or framework it makes sense to ensure your library can be used from any CLR language.

这篇关于我为什么要编写符合CLS的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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