zoukankan      html  css  js  c++  java
  • .NET Standard和.NET Core是什么关系(转载)

    .NET Standard vs .NET Core

    问:


    I have read about the difference between .NET Standard and .NET Core, but I really don't know what the difference is, or when to choose a .NET Standard library project and when to choose a .NET Core library project.
    I have read that .NET Standard is to ensure that a set of APIs are always available, no matter the platform used (as long as that platform is compatible with the .NET Standard version that I have chosen). If I'm not mistaken, this means that I can create a class library of .NET Standard and then use it on any platform that is compatible with the .NET Standard version that I have chosen.
    With .NET Core, I have read that it is intended for cross-platform use too, so if I choose a .NET Core library it seems that I can use it on many platforms too, just like .NET Standard.
    So at the end, I don't see the difference. When should I use which? What is the difference between them?

    答:


    .NET Standard is a specification, so a library compiled for a specific .NET Standard version can be used in different .NET Standard implementations.
    As said in my other comment, a good analogy for the relationship between .NET Standard and other .NET Standard Implementations (.NET Core, .NET Framework, etc): .NET Standard versions are Interfaces, while frameworks are implementations of those interfaces.

    Note: in the original analogy used interfaces for both .NET Standard versions and frameworks implementations. I believe that using interfaces and classes is, instead, more intuitive and better represents the relationship between specifications and concrete implementations.

    In code terms:
    .NET Standard = interface
    .NET Core, .NET Framework, etc = classes

    原文链接

  • 相关阅读:
    Zookeeper 入门第一篇
    jmap命令
    Java中的原子操作类
    Fel表达式实践
    Fel表达式使用过程中需要注意的问题
    【luoguP1196】 [NOI2002]银河英雄传说--边带权并查集 ,
    【luoguP1955 】[NOI2015]程序自动分析--普通并查集
    【csp模拟赛2】 序列操作
    【csp模拟赛2】 爆搜 方格加数
    HZWER
  • 原文地址:https://www.cnblogs.com/OpenCoder/p/11643682.html
Copyright © 2011-2022 走看看