ITask task = new Task { Description = "Coding for fun", DueDate = DateTime.Now, IsCompleted = false, Categories = new HashedSet() };
contrast with the old way of doing things
ITask task = TaskFactory.Instance;
task.Description = "Yak Shaving";
task.IsCompleted = false;
.
.
It's the small things like this that make for a more productive coding experience. The intent is more direct and one quickly gets to the destination in a DRY way. Nice!
No comments:
Post a Comment