Domanda

I have some old c#-libraries. Is it possible to use them in a browser application? Can I use them with the JavaScript-Object for example?

Thanks

È stato utile?

Soluzione

You probably will be able to do that, but it will require some work from you.

To use the library, create a project whose output type is "WinMD file" (either new one, or change the library you have). In this project, all public types and their non-private members have to adhere to some WinRT rules.

For example:

  • classes should be sealed (with exceptions for GUI controls)
  • custom types may not be generic
  • most generic types from the framework may not be used, with the exception of some collection interfaces

Altri suggerimenti

Yes you can. WinJS is built on top of WinRT which has a "translating layer" from any (supported) platform language. So you definitely should be able to use any "old" C# libraries in your code written in JavaScript in WinJS.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top