Eric Landes has a brief code snippet on using C3 to automate project here:Corporate Coder : Project 2003 Adding Tasks via C#
All I can say is that C# is slightly less than elegant in the way it handles optional parameters.
For what an idea of what I'm talking about, here is how to invoke FileOpen:
m_ProjectProApp.FileOpen ( "MyProjectName", missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, PjPoolOpen.pjDoNotOpenPool, missingValue, missingValue, missingValue, missingValue);
Just a bit awkward, wouldn't you say?
Comments (3)
Whats is the missingValue type? I could not get it work with type string and objects with values null, "", String.Empty, "Nothing". If possible, please send me the sample code.
I appriciate your help.
Thanks,
Sarath
Posted by Sarath Pinninty | July 5, 2006 10:39 AM
Posted on July 5, 2006 10:39
If anyone is searching for missingValue:
object missingValue = Type.Missing;
Posted by Bela Orosz | November 15, 2006 7:56 AM
Posted on November 15, 2006 07:56
just include system.reflections
Posted by danny | March 17, 2008 3:50 AM
Posted on March 17, 2008 03:50