C # class library, Silverlight class library, asmx WTH web services

ASMX services cannot reuse the Silverlight class library, and a Silverlight application requires a special class library, not a C # class library. So I had to duplicate the code of the C # class library in the Silverlight class library to work with my Silverlight application, now this is not a problem. I would like to receive technical answers (if possible, whenever possible) to these questions.

  • Why Silverlight needs a dedicated Silverlight class library. Although he works on the CLR layer

  • ASMX service methods return C # class library objects, why is this not castablefor a similar Silverlight class

  • How to make the ASMX service work with the same class library (since the objects returned from webservice do not seem to display methods in intellisense in them)

+1
source share
1 answer

Ok, here is the answer. Silverlight class libraries are compatible with all .NET platforms (since they are versionless). Just do it, compile the class library for the assembly, and then add the link (instead of adding to the project).

  • The Silverlight class library provides additional references (for assemblies that target the Silverlight platform) backstage, so Silverlight also needs these links to work properly.

  • Create an instance of the class again (there is no easy way to do this)

  • , webservice. ,

0

All Articles