This is a list of C# language features and whether SaltarelleCompiler supports them. If a feature is not on the list, it is most likely supported (unless it is very obscure).
C# 转 JS 编译器 Saltarelle
这个编译器可以将 C# 代码编译成 JavaScript 代码。所以你可以使用所有 C# 的优势,例如静态类型检查,自动补全,Lambda 表达式等等。再也不会有“object does not support this property or method”错误了!
Saltarelle 兼容其他的 JavaScript 类库和框架,例如 jQuery。Saltarelle 支持 C# 4.0:
支持C# 语言特性如下:
- Inheritance
Supported - Type inference
Supported - ref/out parameters
Supported - Generics
Supported - Anonymous types
Supported - Lambdas and anonymous delegates
Supported - User-defined operators
Supported - User-defined conversions
Supported - Method overloading
Supported - Constructor overloading
Supported - Object and collection initializers
Supported - foreach
Supported - using statement
Supported - Exception handling
Supported - Named and default arguments
Supported - C# variable capture semantics
Supported - Always evaluate expressions left-to-right
Supported - Properties
Supported - Indexers
Supported - Events
Supported - Nullable types and lifted operators
Supported - dynamic
Supported - Nested types
Supported - Query expressions
Supported - goto/goto case/goto default
Supported - Iterator blocks (yield)
Supported - lock statement
Has no effect - async
Not yet supported - Multi-dimensional arrays
Not yet supported - Expression trees
Not yet supported - operator true/false
Not yet supported - extern alias
Not yet supported - Clipped integer type (short/byte)
Not yet supported - checked/unchecked
Not yet supported - User-defined value types
Not yet supported - Pointers
No support planned
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!