DevPinoy.org
A Filipino Developers Community
ATTENTION:Take our Code Challenge for the month of October 2008 and win some great prize! Learn more about it here!

Strongly-typed Collection’s Add and AddRange methods

The CollectionCodeDomSerializer uses reflection to serialize a serializeable collection properties to locate methodinfo with “Add” and “AddRange” as names. 

We have a coding convention here to use prefix to clearly distinguish methods from properties, and others.  Method like these should have been exempted from the said convention.  Now, I’m taking my time fixing the generated code to its past working state since the Windows Forms Designer removed code gens for the said collections when he was not able to find the said methods the moment he regenerated them <sigh>.

If you're saying that the said class still has "Add" and "AddRange" which is defined in the CollectionBase class, good point.  However, they are defined as EII (Explicit Interface Implementation) and therefore declared as private, methods is inaccessible for code-generated property settings.


Posted Apr 14 2005, 03:41 PM by jokiz

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Enter the numbers above:

Copyright DevPinoy 2005-2008
Powered by Community Server (Commercial Edition), by Telligent Systems