Skip to content

Instantly share code, notes, and snippets.

@shawnwildermuth
Created May 25, 2018 00:51
Show Gist options
  • Save shawnwildermuth/74f0c0e066626d531c051cf5db075c20 to your computer and use it in GitHub Desktop.
Save shawnwildermuth/74f0c0e066626d531c051cf5db075c20 to your computer and use it in GitHub Desktop.
Badly formatted Collection that VS won't format.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SomeApp
{
public class SomeStaticCollection : List<Person>
{
public SomeStaticCollection()
{
AddRange(new[]
{
new Person()
{
Name = "Shawn",
Address = new Address()
{
StreetAddress = "123 Main Street",
City = "Atlanta",
State = "GA",
PostalCode = "12345"
}
}
});
}
}
public class Person
{
public int Id { get; set; }
public Address Address { get; set; }
public string Name { get; internal set; }
}
public class Address
{
public string StreetAddress { get; set; }
public string City { get; set; }
public string State { get; set; }
public string PostalCode { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment