You should be aware that for many problems / projects what you offer is unlikely. However, if you want to encode your Javascript in C #, this is the best tool I know for the job: http://scriptsharp.com/
If you want this because you donβt like the syntax, verbosity, classes and types of Javascripts rules (or lack thereof); perhaps you should also look at CoffeeScript . CoffeeScript is all good things in Javascript, and it compiles in Javascript.
Edited 2013-05-26
Anyone reading this answer right now should also know TypeScript , especially if motivation is the best types and type safety.
driis Oct 05 2018-11-11T00: 00Z
source share