What .NET Framework and C# version should I target with my class library?

后端 未结 12 1066
故里飘歌
故里飘歌 2020-12-29 11:04

I\'m building a DLL class library - I want to make it usable by as many people as possible. Which version of the .NET Framework and which C# version should I use? Is it po

12条回答
  •  庸人自扰
    2020-12-29 11:32

    It depends on what the dll is for. If it just has a generic C# logic that you would like to make available to others, then .net 2.0 is probably your best bet. However if it has anything to do with the newer features in .net like WPF, EF, WCF, silverlight, ect then it will need to be in the version of .net that supports that particular feature.

    Personally, I would say write it in .net 3.5 only because making the jump from .net2.0 to .net3.5 is pretty painless because there is not many breaking changes unlike the jump from .net1.x to .net2.0. :)

提交回复
热议问题