Click here to Skip to main content
15,889,839 members

Comments by Ankush Bansal (Top 8 by date)

Ankush Bansal 7-Jul-13 10:46am View    
Looks like something is fishy in your datasource... can you post some code ?
Ankush Bansal 28-Jun-13 6:53am View    
Reason for my vote of 5 \n great work amit... have my 5 for it!!!
Ankush Bansal 9-Sep-12 13:12pm View    
Hi Mattias,

Have my 5 for the detailed answer. I appreciate your comments on refactoring and untit testing, however my question still remains open:
Is the protected "_field" of Base, a bad usage, given that both Base and Derived are internal and would never be used outside of the assembly? And what if protected member is a complex data type?
Ankush Bansal 9-Sep-12 13:09pm View    
Hi,

So, do you mean to say that a protected field of primitive type is fine, however a protected field of complex data type is not recommended? If yes, can you please suggest some examples of why you think so?

Thanks
ankush
Ankush Bansal 9-Sep-12 12:58pm View    
Hi,

Recently in code review I got a feedback that initializing a protected field as shown in example 1 is dangerous and highly discouraged.
To be very honest, through this question, I am trying to convince myself that use of protected property is not as bad as its portrayed.

Thanks,
ankush