I’m writing a little Console app to test some basic MS ProjectServer interop. I can connect to the server with no problems, and I was trying to refactor one of my for (int i = 0; i < projectDataSet.Project.Count; i++) loops for a foreach (var project in projectDataSet.Project) one.
When I do the for, the type of projectDataSet.Project is SvcProject.ProjectDataSet.ProjectDataTable. So, I do the following:
projectClient.ReadProject(projectDataSet.Project[i].PROJ_UID,
SvcProject.DataStoreEnum.WorkingStore);
To get the Project object I need.
But when I do the foreach variation, the type of the object project is SvcProject.ProjectDataSet+ProjectRow. I don’t know how to handle this. What does it means, exactly?
It means that
type2is nested intype1To demonstrate this:
Output: