Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Csharp2JavaNew to Visual Studio Code? Get it now.
Csharp2Java

Csharp2Java

jerrycore

|
118 installs
| (0) | Free
code conveter by jerry! ctrl+1 ctrl+2 ctrl+3
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Csharp2Java

一个c# 代码通过快捷键快速转换为java语法的扩展

用法

Ctrl+1 通用选中替换

params.push({type: "str", src: "Nullable<int>", dist: "Integer"});
params.push({type: "str", src: "int?", dist: "Integer"});
params.push({type: "str", src: "int", dist: "Integer"});
params.push({type: "str", src: "Nullable<DateTime>", dist: "Date"});
params.push({type: "str", src: "System.DateTime", dist: "Date"});
params.push({type: "str", src: "DateTime?", dist: "Date"});
params.push({type: "str", src: "DateTime", dist: "Date"});
params.push({type: "str", src: "decimal?", dist: "BigDecimal"});
params.push({type: "str", src: "decimal", dist: "BigDecimal"});

params.push({type: "str", src: "Nullable<bool>", dist: "Boolean"});
params.push({type: "str", src: "bool?", dist: "Boolean"});
params.push({type: "str", src: "bool", dist: "Boolean"});

params.push({type: "str", src: "{ get; set; }", dist: ";"});
params.push({type: "str", src: ".ToList()", dist: ".collect(Collectors.toList())"});
params.push({type: "str", src: ".Any()", dist: ".size()>0"});
params.push({type: "str", src: "new List<", dist: "new ArrayList<"});
params.push({type: "str", src: "String.IsNullOrEmpty(", dist: "StrUtil.isEmpty("});
params.push({type: "str", src: "String.IsNullOrWhiteSpace(", dist: "StrUtil.isEmpty("});

params.push({type: "str", src: ".Where(", dist: ".stream().filter("});
params.push({type: "str", src: ".HasValue", dist: "!=null"});
params.push({type: "str", src: "String.Join(", dist: "String.join("});

Ctrl+2 选中转为getXX()形式

a.UserId ----->  a.getUserId()

Ctrl+3 选中转为setXX()形式

a.UserId ----->  a.setUserId()
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft