Make sure to include any dependent classes that are used inside your root class.
Example C# Class:
public class TestClass
{
public bool TestBool { get; set; }
public Boolean TestBoolean { get; set; }
public string TestString { get; set; }
public String TestString_2 { get; set; }
public Guid TestGuid { get; set; }
public DateTime TestDateTime { get; set; }
public DateTimeOffset TestDateTimeOffset { get; set; }
public char TestChar { get; set; }
}
Click the convert button and wait a few seconds until your C# examples and objects appear.
This is the generated code that you'll get from the request we made earlier:
TestClass testclass = new TestClass() {
TestBool = true,
TestBoolean = true,
TestString = "",
TestString_2 = "",
TestGuid = Guid.NewGuid(),
TestDateTime = DateTime.Now,
TestDateTimeOffset = DateTimeOffset.Now,
TestChar = 'c',
};
In this case, you can use this example in your solution without the need to initialize each field from your C# class.