Home > database >  C# compiler, Calling a valid constructor gives error
C# compiler, Calling a valid constructor gives error

Time:12-25

enter image description here

Well , the picture speaks for itself.

  • Silverlight project
  • VS 2015 ( tried also with 2013 and 2012 )

CodePudding user response:

It is a documented restriction, the constructor you are trying to use is not supported in Silverlight version 5. From the MSDN article:

Supported in: 4, 3

Not crystal why it was dropped, probably has something to do with it being [SecurityCritical].

Why your IntelliSense still shows it is hard to guess, I certainly can't repro that. You probably ought to verify the path to the mscorlib reference, mine points to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v5.0\mscorlib.dll

  • Related