Tarscher,
You have to do it yourself, like so:
public class KeywordCollection : BindingList<BaseKeyword>
{
public KeywordCollection(KeywordCollection toCopy)
{
// Copy here.
}
}
However, given that this doesn't have the same semantics in .NET as it
did in C++, you might want to look into implementing the IClonable interface
instead.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Tarscher" <ta******@gmail.comwrote in message
news:11**********************@r29g2000hsg.googlegr oups.com...
Hi all,
I need to make a copy constructor for a collection class:
public class KeywordCollection : BindingList<BaseKeyword>
{}
Class KeywordCollection is nothing more than a BindingList of
BaseKeywod.
I just don't see how I can make a copyconstructor in the
KeywordCollection class.
eg: KeywordCollection keywordsNew = new KeywordCollection(keywordOld)
I hope somone can help.
Regards,
Stijn