September 2011 Blog Posts

Dictionaries, Reflection, Private Fields, and Me...

Hello. So the other day at work I was confronted with a problem.  A particular class we use extensively throughout an enterprise solution was using OO to hide a Dictionary<string, object> from me...BUT ALL FOR NAUGHT! Said class has a private field which is basically a Dictionary<string, object> instance.  You could add to it just fine via a public method created for that very purpose.  But as is typical with any ongoing large project, we suddenly needed the ability to remove from that field by a given key just for unit testing, and the powers that be frowned...

«September»
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678