Convert typescript code to csharp code.
npm install ts-csharpjavascript
import { convertInterfacesToCSharp } from "ts-csharp";
const myTypescriptClassString =
;
const myCsharpClass = convertInterfacesToCSharp(myTypescriptClassString);
console.log(myCsharpClass);
`
Generates the following code:
`c#
public class MyTypescriptClass {
[JsonProperty("propOne")]
public object PropOne;
[JsonProperty("propTwo")]
public string PropTwo;
[JsonProperty("propThree")]
public IEnumerable PropThree;
[JsonProperty("propFour")]
public bool PropFour;
}
public class AnotherTypescriptClass {
[JsonProperty("nestedObjectsInAList")]
public IEnumerable NestedObjectsInAList;
[JsonProperty("recursiveObject")]
public AnotherTypescriptClass RecursiveObject;
[JsonProperty("isReallyCool")]
public bool IsReallyCool;
}
``