PITA!
As such i continue to use pretty much no Apache api's in my dev.
...and the downloads are 1.1 that dont run... NLog has just cemented its place in my toolbox.
A .Net blog with ramblings on code and other assorted things from a joe average developer.
There are a couple of things i try to keep in mind when writing code, well they is plenty but specifically for this post 2.
Re-usability and Reliability.
I do all that I can to fail fast. I want my errors to come up as I type, ideally your IDE will support you on this, if not plug ins like ReSharper help. Other wise I want build errors to tell me, “Hey mate your code is junk this does not make sense!”. The last thing I want is run time errors. This is not obviously shared with others.
In my mind using strings for business logic is a last resort and if done there are always constants.
Casting is also a last resort, and usually only done from a know parent class to a subclass.
I would much rather use enumerated constants, generics, type checks to perform this business logic or flow control.
i have spotted in a few place where effective type checks are being done using string
if( Object.symbolX = "Fully.Qualified.Name.Space.ClassName")
{...}
if some one changes that name space then every check now has to be changed and the compiler will not pick it up.
it would have been just as easy (actually easier) to write
if( Object.symbolX = typeof(Fully.Qualified.Name.Space.ClassName).Fullname)