Based on your further explanation, I think that the following may help.
Let's suppose the FileRow class has an integer called fileInt and the
CookieRow class has an int called cookieInt. Suppose the collection class
has a method called DoSomething(). Then you could do something like the
following:
public void DoSomething()
{
foreach( Row r in this )
{
int dRow;
if( r is FileRow )
dRow = ((FileRow)r).fileInt;
else
dRow = ((CookieRow)r).cookieInt;
}
}
The key here is the if( r is FileRow) statement. This identifies r as in
instance of the FileRow class. Then you use the (odd-looking) cast to get to
the FileRow member field.
I hope this helps.
..ARN.
"DelGator" wrote:
Sorry...
I have a base class, let's call it a "Row", that I have created derived
classes from. So, let's call the derived classes "FileRow" and
"CookieRow". I have also created a "Row" type collection class, based
on CollectionBase.
The derived classes, "FileRow" and "CookieRow" have additional
properties from those inherited from "Row". I want to be able to access
those additional properties from within the collection.
I know how to access the derived class members when dealing with simple
base class variables. You would cast...
(FileRow)Row.derivedClassProperty
What I need is the process for accessing them inside the collection.
Hope this is clearer.
Thanks in advance...