Skip to content

Instantly share code, notes, and snippets.

@PhiHuyHoang
Created September 20, 2018 09:44
Show Gist options
  • Save PhiHuyHoang/bd85cddd1466af9b09fdc6ff40768046 to your computer and use it in GitHub Desktop.
Save PhiHuyHoang/bd85cddd1466af9b09fdc6ff40768046 to your computer and use it in GitHub Desktop.
static void Main(string[] args)
{
List<Post> Facebook = new List<Post>();
Facebook.Add(new Post { status = "status A", timestamp = DateTime.Now });
Facebook.Add(new Post { status = "status B", timestamp = DateTime.Now });
Facebook.Add(new Post { status = "status C", timestamp = DateTime.Now });
foreach(Post p in Facebook)
{
Console.WriteLine($"Status: {p.status} - Datetime: {p.timestamp}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment