473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

generics.addnew - follow question

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?
Jan 4 '06 #1
2 1346
"guy" <gu*@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/>

Jan 4 '06 #2
guy
system.componentmodel.bindinglist.addnew

its ok,

according to the docs
AddNew does not support constructors:(

"Herfried K. Wagner [MVP]" wrote:
"guy" <gu*@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/>

Jan 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim Marshall | last post by:
ODBC situation, Access 97, here is the code and I've marked where Access coughs up. The Access error message is 3027, can't update, database is read only. The Oracle table in question has a...
17
by: Andreas Huber | last post by:
What follows is a discussion of my experience with .NET generics & the ..NET framework (as implemented in the Visual Studio 2005 Beta 1), which leads to questions as to why certain things are the...
12
by: Michael S | last post by:
Why do people spend so much time writing complex generic types? for fun? to learn? for use? I think of generics like I do about operator overloading. Great to have as a language-feature, as...
13
by: Luc Vaillant | last post by:
I try to compare to values of generic value type T in a generic class as follow: public class C<T> where T : struct { private T value1; private T value2; C(T value1, T value2) {
3
by: guy | last post by:
i am new to generics so... if i have say dim MySecondList as new BindingList (Of MyFirstThing) dim MyFirstList as new BindingList (Of MySecondThing) how can i instantiate a new item withing...
1
by: guy | last post by:
i have a generic class Public Class ACollection(Of T) Inherits BindingList(Of T) where BaseDataClass is declared mustinherit i then have some code that loadss the collection With oSQLDR...
11
by: herpers | last post by:
Hello, I probably don't see the obvious, but maybe you can help me out of this mess. The following is my problem: I created two classes NormDistribution and DiscDistribution. Both classes...
5
by: Wiktor Zychla [C# MVP] | last post by:
suppose I have a class class MyContainter { List<something1list1; List<something2list2; ... List<somethingnlistn; othertype1 otherfield1; ...
7
by: SpotNet | last post by:
Hello NewsGroup, Reading up on Generics in the .NET Framework 2.0 using C# 2005 (SP1), I have a question on the application of Generics. Knowingly, Generic classes are contained in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.