Browse by Tags
All Tags »
C# (
RSS)
I was going back through an application I am currently working on for a client and trying to come up with a way to bridge a gap between that application and a new web site they want, which has two separate application architectures and ORM solutions....
I been thinking about when I should differentiate between methods and properties. For instance, suppose that I have the following class: public class OrderProcessor { public bool RoundToNearestCent { get; set; } public bool RoundDown { get; set; } } This...
You may have already noticed that it's harder to debug errors that occur within a Lambda expression. For instance, if you have this Lambda expression: var entries = collection.Where(i => i.EndDate.Value >= new DateTime(2008, 2, 1)); Notice the...
When designing your applications to expose list-based data, there is a difference between styles of programming. For instance, suppose you wanted to expose a collection of objects to the consumer. This could be simply done using the following class: public...
VS provides a debugging challenge when it comes to inline property declarations as such as this: DataRow row = table.Rows[0]; var obj = new SomeClass { ID = GetValue<int>(row, "ID"), Name = GetValue<string>(row, "Name"...
This is one common variant to the strategy/state pattern that I commonly use. It varies in that I use a second object to actually figure out which stategy/state pattern object should be used in a given situation. For instance, suppose we had the following...
I've been asked: "why use dynamic"? I admit, there aren't a lot of areas where dynamic is really needed. But there are some, and while I'd recommend limiting use of the dynamic keyword, I would never suggest not to ban it. One of...
Microsoft had some interesting presentations at the PDC in Los Angeles. Some of the newest features are (found from this http://channel9.msdn.com/pdc2008/TL16/ ) The new dynamic keyword, which allows for dynamic invocation of methods that you don't...