451 reputation
35
bio website
location
age
visits member for 2 years, 7 months
seen 8 hours ago

Jul
18
answered Organizing solution / project structure and classes for Line of Business Application (LOB)
Jul
8
answered Why isn't there a next operation on enums?
Jul
3
comment Implement Generic DataSet Builder with C#
You could take a look at the System.Data.Common.DbProviderFactory class to create connections, commands, and data adapters, and use the base System.Data.Common objects instead of using Ole* objects directly.
May
28
comment Data structure for grid with negative indeces
Yeah, the declared type is coming from the type parameter on the class definition. I tossed it into a quick console project to confirm. The only change I had to make was replacing this(int index) with this[int index].
May
28
comment Data structure for grid with negative indeces
There's no need to use Activator. It is perfectly valid to use new List<T>(); within the constructor. The casts are unnecessary as well.
May
13
comment Tree View Children condition indicator on topmost un-expanded parent
I'm not sure there's a good reason to remove the indicator upon expansion. If multiple nodes are expanded, only one of which contains a child satisfying your condition, it's much easier to see which path in the tree contains the node you want if the indicators are still present.
May
7
comment Project Organization
+1 for the last paragraph. Splitting up the projects adds complexity to project references and deployment, increases build times, and (in general) increases the total application/library size. This is a case of YAGNI - it's easy enough to split the projects later if necessary, but you are better off not doing so until it is.
May
1
comment How to (or should I) have one assert per test with object comparisons?
+1 It may also be worth implementing ToString, since many testing frameworks will print out value.ToString() for the expected and actual values when the assert fails. Additionally, as a general rule, I implement IEquatable<T> whenever overriding Equals()
Apr
25
comment Why do C# developers newline opening brackets?
@Craig If you could, would you mind adding links to full/abstract versions of the brace studies you mentioned? All I have ever seen with regards to brace styles are holy wars, and a quick search turned up nothing more informative than a listing of different styles :(
Apr
16
comment Testing C# Eventhandler Subscription
You should be able to do with this Ninject and a mocking framework. One option is to use something like ninjectObject.Bind<INeedToBeMocked>().ToConstant(mockedObject); during your testing.
Apr
15
awarded  Yearling
Apr
15
answered Testing C# Eventhandler Subscription
Mar
6
answered Is it bad practice to update an object in a static method?
Feb
18
comment How do I manage a very large set of rules and magic numbers in my program?
...except too many levels of indirection :)
Feb
18
comment Problems with Facades and then evolution in software
Aside from the question - why use a void method with an out parameter instead of making List<OutputPocoObject> the return value of FillList?
Feb
11
comment Choosing value in SQL query vs (Java) code
What you do will depend on what significance the values have. Are the values 1, 2, and 3 represent anything meaningful in the database layer, or do they only have meaning for the code?
Feb
11
comment Is it normal for developers to suggest feature ideas to product owners?
@RibaldEddie I disagree with the last part. Anyone should be free to suggest features. Management and product owners are still free to determine if the feature goes anywhere. Don't overlook the possibility that a developer with sufficient domain and technical knowledge could come up with a huge, money-making feature that's completely outside the original business plan. A product owner may never come up with the same idea due to limited technical knowledge.
Feb
10
comment Switch or a Dictionary when assigning to new object
The OP states that he needs it to create new instances each time. The second solution with lambdas and the third solution with a switch both do that, while the first solution and the Lazy<T> implementation do not.
Feb
10
comment Switch or a Dictionary when assigning to new object
However, once Lazy.Value is invoked, it uses the same instance for its lifetime. See Lazy Initialization
Feb
7
comment Does this justify goto statements?
@JohnWu goto is actually required in a C# switch to fall-through to another case after executing any code inside the first case. That is the only case I have used goto, though.