koalabruder
koalabruder

Reputation: 2904

Can I use my old c#-libraries with WinJS?

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

Upvotes: 5

Views: 823

Answers (2)

svick
svick

Reputation: 244767

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

Upvotes: 3

Alexey Raga
Alexey Raga

Reputation: 7525

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.

Upvotes: 1

Related Questions