Home All Groups Group Topic Archive Search About

generics.addnew - follow question

Author
4 Jan 2006 4:09 PM
guy
if i use  Generics.AddNew how do I pass an object to the items constructor?
I have a set of class all inheriting from a base class, all requiring one
parameter on their constructor - the data passed to it will be the same
independent of the class type
so how do i pass it to AddNew?

Author
4 Jan 2006 4:37 PM
Herfried K. Wagner [MVP]
"guy" <g**@discussions.microsoft.com> schrieb:
> if i use  Generics.AddNew how do I pass an object to the items
> constructor?
> I have a set of class all inheriting from a base class, all requiring one
> parameter on their constructor - the data passed to it will be the same
> independent of the class type
> so how do i pass it to AddNew?

Which 'AddNew' method?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
5 Jan 2006 8:42 AM
guy
system.componentmodel.bindinglist.addnew

its ok,

according to the docs
AddNew does not support constructors:(

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "guy" <g**@discussions.microsoft.com> schrieb:
> > if i use  Generics.AddNew how do I pass an object to the items
> > constructor?
> > I have a set of class all inheriting from a base class, all requiring one
> > parameter on their constructor - the data passed to it will be the same
> > independent of the class type
> > so how do i pass it to AddNew?
>
> Which 'AddNew' method?
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
>