How to import properties of an external API into Script#
- by AndrewDotHay
I'm using Script# inside Visual Studio 2010 to import the API for the HTML5 Canvas element.
Its working great for things like FillRect(), MoveTo(), LineTo() and so on. I've declared the following interface and then I can code against it in C#. Then, Script# converts it to JavaScript nicely.
public interface CanvasContext
{
void FillRect(int…