C# 转 JS 编译器 Saltarelle

jopen 12年前

这个编译器可以将 C# 代码编译成 JavaScript 代码。所以你可以使用所有 C# 的优势,例如静态类型检查,自动补全,Lambda 表达式等等。再也不会有“object does not support this property or method”错误了!

Saltarelle 兼容其他的 JavaScript 类库和框架,例如 jQuery。Saltarelle 支持 C# 4.0:

支持C# 语言特性如下:

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).

  • Inheritance  C# 转 JS 编译器 SaltarelleSupported
  • Type inference  C# 转 JS 编译器 SaltarelleSupported
  • ref/out parameters  C# 转 JS 编译器 SaltarelleSupported
  • Generics  C# 转 JS 编译器 SaltarelleSupported
  • Anonymous types  C# 转 JS 编译器 SaltarelleSupported
  • Lambdas and anonymous delegates  C# 转 JS 编译器 SaltarelleSupported
  • User-defined operators  C# 转 JS 编译器 SaltarelleSupported
  • User-defined conversions  C# 转 JS 编译器 SaltarelleSupported
  • Method overloading  C# 转 JS 编译器 SaltarelleSupported
  • Constructor overloading  C# 转 JS 编译器 SaltarelleSupported
  • Object and collection initializers  C# 转 JS 编译器 SaltarelleSupported
  • foreach  C# 转 JS 编译器 SaltarelleSupported
  • using statement  C# 转 JS 编译器 SaltarelleSupported
  • Exception handling  C# 转 JS 编译器 SaltarelleSupported
  • Named and default arguments  C# 转 JS 编译器 SaltarelleSupported
  • C# variable capture semantics  C# 转 JS 编译器 SaltarelleSupported
  • Always evaluate expressions left-to-right  C# 转 JS 编译器 SaltarelleSupported
  • Properties  C# 转 JS 编译器 SaltarelleSupported
  • Indexers  C# 转 JS 编译器 SaltarelleSupported
  • Events  C# 转 JS 编译器 SaltarelleSupported
  • Nullable types and lifted operators  C# 转 JS 编译器 SaltarelleSupported
  • dynamic  C# 转 JS 编译器 SaltarelleSupported
  • Nested types  C# 转 JS 编译器 SaltarelleSupported
  • Query expressions  C# 转 JS 编译器 SaltarelleSupported
  • goto/goto case/goto default  C# 转 JS 编译器 SaltarelleSupported
  • Iterator blocks (yield)  C# 转 JS 编译器 SaltarelleSupported
  • lock statement  C# 转 JS 编译器 SaltarelleHas no effect
  • async  C# 转 JS 编译器 SaltarelleNot yet supported
  • Multi-dimensional arrays  C# 转 JS 编译器 SaltarelleNot yet supported
  • Expression trees  C# 转 JS 编译器 SaltarelleNot yet supported
  • operator true/false  C# 转 JS 编译器 SaltarelleNot yet supported
  • extern alias  C# 转 JS 编译器 SaltarelleNot yet supported
  • Clipped integer type (short/byte)  C# 转 JS 编译器 SaltarelleNot yet supported
  • checked/unchecked  C# 转 JS 编译器 SaltarelleNot yet supported
  • User-defined value types  C# 转 JS 编译器 SaltarelleNot yet supported
  • Pointers  C# 转 JS 编译器 SaltarelleNo support planned

项目主页:http://www.open-open.com/lib/view/home/1346806817412