Created
July 15, 2016 10:09
-
-
Save bjoerntx/d80f8f78d6074b339d1bc56ebc050146 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Invoice> Invoices = new List<Invoice>(); | |
Invoice invoice = new Invoice() | |
{ | |
Customer = new Customer() { | |
Name = "Peter Thiel", | |
City = "Charlotte", | |
Street = "123 Microsoft Way", | |
Zip = 22282 }, | |
InvoiceNumber = "I778977622", | |
Items = new List<Product>() | |
{ | |
new Product() { | |
Name = "Product 1", | |
Description = "Product 1 Description" | |
}, | |
new Product() { | |
Name = "Product 2", | |
Description = "Product 2 Description" | |
} | |
} | |
}; | |
Invoices.Add(invoice); | |
var json = JsonConvert.SerializeObject(Invoices, Formatting.Indented); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment