Peter,
I am embedding an arraylist within a struct in C# that is then is wrapped
for a COM-base client... My code looks like this:
#region Build structs
//Build structs for processing feature classes.
//This enables method overloading.
public struct stmatch
{
[MarshalAs(UnmanagedType.Interface)]
public IWorkspace pWorkspace;
public string OutTable;
public string InTable;
public string SubFields;
public string sSubType;
}
public struct stmatchwhere
{
[MarshalAs(UnmanagedType.Interface)]
public IWorkspace pWorkspace;
public string OutTable;
public string InTable;
public string SubFields;
public string sSubType;
public string WhereClause;
}
public struct stmatchsubtype
{
[MarshalAs(UnmanagedType.Interface)]
public IWorkspace pWorkspace;
public string OutTable;
public string InTable;
public string SubFields;
public string sSubType;
}
public struct stmatchall
{
[MarshalAs(UnmanagedType.Interface)]
public IWorkspace pWorkspace;
public string OutTable;
public string InTable;
public string SubFields;
public string sSubType;
public string WhereClause;
}
public struct stnomatch
{
[MarshalAs(UnmanagedType.Interface)]
public IWorkspace pWorkspace;
public string OutTable;
public string InTable;
public string outSubFields;
public string inSubFields;
}
public struct stnomatchsubtype
{
[MarshalAs(UnmanagedType.Interface)]
public IWorkspace pWorkspace;
public string OutTable;
public string InTable;
public string outSubFields;
public string inSubFields;
public string sSubType;
}
public struct stnomatchwhere
{
[MarshalAs(UnmanagedType.Interface)]
public IWorkspace pWorkspace;
public string OutTable;
public string InTable;
public string outSubFields;
public string inSubFields;
public string WhereClause;
}
public struct stnomatchall
{
[MarshalAs(UnmanagedType.Interface)]
public IWorkspace pWorkspace;
public string OutTable;
public string InTable;
public string outSubFields;
public string inSubFields;
public string sSubType;
public string WhereClause;
}
#endregion
//Now add arraylists to each struct...
// Setup list of feature classes (tables) with associated array of arcfm
tables
SortedList slFeatureClasses = new SortedList();
ArrayList alArcFMTables = new ArrayList();
//Add arraylist of arcfm tables to sorted list of sde tables
alArcFMTables.Add("gis_elec.abandonedelectriclinesegment");
alArcFMTables.Add("gis_elec.conduitsystem");
alArcFMTables.Add("gis_elec.priohelectriclinesegment");
alArcFMTables.Add("gis_elec.priugelectriclinesegment");
alArcFMTables.Add("gis_elec.secohelectriclinesegment");
alArcFMTables.Add("gis_elec.secugelectriclinesegment");
slFeatureClasses.Add(conElCableLine, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.anchorguy");
alArcFMTables.Add("gis_elec.pushbrace");
slFeatureClasses.Add(conUtGuyPoint, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.conduitsystem");
slFeatureClasses.Add(conElDuctBankLine, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.electricstation");
slFeatureClasses.Add(conElSubStationSite, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.generator");
slFeatureClasses.Add(conElGenPoint, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.primarymeter");
slFeatureClasses.Add(conElMeterPoint, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.riser");
slFeatureClasses.Add(conElRiserPoint, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.switch");
alArcFMTables.Add("gis_elec.switchingfacility");
slFeatureClasses.Add(conElSwitchPoint, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.transformer");
slFeatureClasses.Add(conElTransBnkPnt, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.undergroundstructure");
slFeatureClasses.Add(conElJuncPoint, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.streetlight");
slFeatureClasses.Add(conExLightPoint, alArcFMTables);
alArcFMTables = new ArrayList();
alArcFMTables.Add("gis_elec.supportstructure");
slFeatureClasses.Add(conUtPoleTowerPoint, alArcFMTables);
This should clear it all up for you

... enjoy.