C#.NET之间的兼容性库VS C#单 [英] Library compatibility between C# .NET vs C# Mono

查看:125
本文介绍了C#.NET之间的兼容性库VS C#单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想试训C#通用编程(不是Web开发)。我编写在Windows环境下,但我想,以避免专门为Windows(.NET)的编码,因为我希望保持选项打开对Linux未来的迁移。




  1. 有没有在C#.NET任何特定的库在C#中单通用的编程工作,将无法正常工作(不感兴趣在Windows窗体,Silverlight和类似的东西)?


  2. 是否有规定,在C#.NET工程不会对C#单工作,或者反之亦然列表的东西/功能的网络链接?我没有发现很容易在谷歌本身什么。




注:(!感谢)我会感兴趣的具体答案,而这意见是好还是坏

解决方案
<醇>
  • 这是可能的一个CLR组件(甚至在DLL的形式,如在提及评论)由单读取,只要它不具有不存在单的依赖,因为...

  • ...不是每一段代码编译为.NET编译为单声道,因为有很多Windows的特定事物的.NET(C#的不严格一部分)未落实(WPF,ASP.NET异步栈)或没有意义可言在Linux中(COM就是这样一个例子,我认为)。



  • 幸运的是,什么.NET功能在单实施的列表。更幸运的是,似乎他们已经一个应用程序,告诉你一个先验的代码是否利用了在任何单<不落实/ A>(但我从来没有尝试过)。


    I wanted to tryout C# for general purpose programming (not web development). I program in Windows environment, but I would like to avoid coding specifically for Windows (.NET), because I want to keep the option open for a future migration to Linux.

    1. Are there any specific libraries in C# .NET that wouldn't work in C# Mono for general purpose programming work (not interested in Windows Forms, Silverlight and stuff like that) ?

    2. Is there any internet link of things/features that provides a list that works on C# .NET wouldn't work on C# Mono or vice versa? I didn't readily find anything in google per se.

    Note: I would be interested in specific answers, not opinions of which is better or worse (thanks!)

    解决方案

    1. It is possible for a CLR assembly (even in the form of a DLL, as mentioned in the comments) to be read by Mono, as long as it does not have dependencies that do not exist in Mono, because...
    2. ...not every piece of code that compiles for .NET will compile for Mono, since there are lots of Windows-specific things in .NET (not strictly part of C#) that aren't implemented (WPF, ASP.NET async stack) or don't make sense at all in Linux (COM is one such example, I think).

    Fortunately, there is a list of what .NET features are implemented in Mono. Even more fortunately, it seems they have an app that tells you a priori whether your code makes use of anything not implemented in Mono (but I have never tried it).

    这篇关于C#.NET之间的兼容性库VS C#单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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