Hello,
I’m a newbie with C# and perhaps my question seems too foolish. Sorry
by that.
I’ve an object (collection type), let’s call it “oApps” that has
several items that I need to get out.
I know how to do that using foreach statement and everything should be
ok. However
I need to reset to null the identifier of the foreach statement and
it’s not allowed within foreach.
foreach (IAPP oApp in oApps)
{
try
{
axApp.Add(app.Name);
axApp.Add(app.Id);
axApp.Add(app.Description);
}
finally
{
if (app != null)
{
Marshal.ReleaseComObject(app);
}
}
}
My question is if I can do it using something else?
The collection has the following extensions that think that could
help, but unfortunately I don’t know how to implement.
- AsQueryable
- Cast
- OfType
I appreciate any help,
Many thanks
--
To unsubscribe, reply using "remove me" as the subject.