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

后端 未结 12 1127
故里飘歌
故里飘歌 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:33

    This solution works quite well. I just set up two different projects each with a unique "Project Properties->Build->Conditional compilation Symbols" and used in the code like this:

    #if NET_4
                xmlReaderSettings.DtdProcessing = DtdProcessing.Ignore; 
    #endif
    #if NET_3_5
                xmlReaderSettings.ProhibitDtd = false;                
    #endif
    

提交回复
热议问题