Skip to content

Instantly share code, notes, and snippets.

@AbhinavPradeep
Created December 12, 2019 23:54
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 AbhinavPradeep/3e34c15cebffb6892bcb04a0fef87873 to your computer and use it in GitHub Desktop.
Save AbhinavPradeep/3e34c15cebffb6892bcb04a0fef87873 to your computer and use it in GitHub Desktop.
namespace AuthorSerialize
{
class AuthorFactory
{
public Author CreateAuthor()
{
Author Kishimoto = new Author();
Kishimoto.FirstName = "Mashashi";
Kishimoto.LastName = "Kishimoto";
Address KishimotoAddress = new Address();
KishimotoAddress.Country="Japan";
KishimotoAddress.State="Okoyama Prefecture";
KishimotoAddress.Street="Nagi";
KishimotoAddress.HouseNum = 4269;
Kishimoto.Address = KishimotoAddress;
Book Naruto = new Book();
Book Boruto = new Book("Boruto Uzumaki", "Shounen", "343434");
Naruto.BookName = "Naruto";
Naruto.Genre = "Shounen";
Naruto.ISBNcode="1212212";
Kishimoto.Books.Add(Naruto);
Kishimoto.Books.Add(Boruto);
return Kishimoto;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment