Skip to content

Instantly share code, notes, and snippets.

@micahasmith
Created November 6, 2012 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micahasmith/4026517 to your computer and use it in GitHub Desktop.
Save micahasmith/4026517 to your computer and use it in GitHub Desktop.
Quick object in C#
@{
object copy = new
{
year = Model.Element("CopyrightDate").Content.Value,
school = Model.Element("SchoolName").Content.Value,
address = Model.Element("SchoolAddress").Content.Value,
city = Model.Element("SchoolCity").Content.Value,
state = Model.Element("SchoolState").Content.Value,
phone1 = Model.Element("SchoolPhonePrimary").Content.Value,
phone2 = Model.Element("SchoolPhoneSecondary").Content.Value
};
}
© Copyright @copy.year |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment