Because of a requirement, JavaScript has to be translated into C #.
There's actually a powerful node. js.
Talk about Code,
You can actually use dynamic to do this. But dynamic has a lot of problems.
Directly on the code bar, not difficult, is very verbose.
Https://github.com/zzbjuke/javascripttoCsharp
Description
C # Variables cannot be changed once they are defined. Unless you use the object type.
JS can be arbitrarily changed.
All types are reference types and inherit BaseType
Assigning a value to an object call the __set__ method
<summary>///Set value/// </summary>/ <param name= "name" ></param> // <param name= "value" ></param> ///<returns></returns> public virtual void __set__ ( String name, _u_ value) { }
Call Object Method __call__ method
<summary>/ //Call method ///</summary>//<param name= "name" ></param> // /<param name= "args" ></param>/// <returns></returns> public virtual _u_ __call__ ( String name, _u_ _this, params _u_[] args) { }
comparison operator, unary operator, two-tuple operator direct (operator) overload reference (_u_.cs)
convert JavaScript to C #