Created
May 25, 2018 00:51
-
-
Save shawnwildermuth/74f0c0e066626d531c051cf5db075c20 to your computer and use it in GitHub Desktop.
Badly formatted Collection that VS won't format.
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
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