4,468 reputation
11123
bio website weblogs.asp.net/avnerk
location Israel
age
visits member for 2 years, 9 months
seen 1 hour ago

Tech-turtle, fond of C# and .NET but likes to venture out to forage elsewhere as well.


Jun
15
comment How about using a DTO class as a property in the corresponding BO class?
@randomA In this case, why even expose the DTO?
Jun
15
comment Need to provide an interface (for plugins) for taking input Type A, and returning output Type B
Please summarize in a few lines what that link says and why it claims that is a bad idea. If the link changes or dies, your question will become impossible to understand.
Jun
15
answered How about using a DTO class as a property in the corresponding BO class?
May
21
comment Why does VBA / VBScript require “Set” prefix
While this is an interesting side effect of the Set semantics, it's not really an answer to the question.
May
19
answered Is it good style to store view data inside the model?
May
11
revised Is there a difference in the C++ language between Visual Studio and Code::Blocks?
Revised for readability.
May
1
comment Why don't more languages have the ability to compare a value to more than one other value?
+1, but I think the answer would be improved by showing one or two of those "existing range-based functions that practically every language [offers]", just so this alternative would be clearer.
Apr
28
awarded  Nice Answer
Apr
27
comment Why do browsers these days ship with dev tools
Downloading an add-in is a significantly more complicated step than typing some words in a window, so there's a significant different in security between shipping it by default or not. Likewise the "Ease of use" - just because it's easy to add useless toolbars doesn't mean you should add more useless toolbars by default.
Apr
27
answered What is the difference between C# and Visual C#?
Apr
23
comment Why is there a new() constraint in C# but no other similar constraint?
Interesting. Why the duplicate call to default(T) for value types?
Apr
19
comment Typical instantiation of new object - is there a way to avoid repetitious syntax?
@Cantabrigian I added a new example to address the suggested syntax you added in your question.
Apr
19
revised Typical instantiation of new object - is there a way to avoid repetitious syntax?
added 787 characters in body
Apr
18
reviewed Approve Typical instantiation of new object - is there a way to avoid repetitious syntax?
Apr
18
reviewed Approve Typical instantiation of new object - is there a way to avoid repetitious syntax?
Apr
18
answered Typical instantiation of new object - is there a way to avoid repetitious syntax?
Apr
8
comment How To Invoke A Method When It's Class is Accessed (Any Method) - “OnClassEnter”
Alternately, if you have no return value, you need to use Action<Device>, since C# doesn't have the concept of void type parameters.
Mar
24
comment Building presentation layer directly on data layer
While I agree with the need for separation, I've found that "what happens if you change UI frameworks or DB engines" is a bit if a red herring. Most projects never do, certainly aren't "likely need to be replaced", and any change will almost certainly require some coding work due to leaky abstractions anyway.
Feb
10
comment Switch or a Dictionary when assigning to new object
You're right. I didn't notice that in the OP, since it's such a less-useful use-case, in my experience. :)
Feb
10
comment Switch or a Dictionary when assigning to new object
Of course, otherwise it wouldn't be lazy initialization, just re-initialization every time.