NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ICodeSourceFile.CreateMethodInvokeStatement

Constructs a method invoke statement.

[Visual Basic]
Function CreateMethodInvokeStatement( _
   ByVal target() As String, _
   ByVal targetType As ICodeClass, _
   ByVal methodName As String, _
   ByVal parameters() As ICodeParameter, _
   ByVal designTime As Boolean _
) As ICodeMethodInvokeStatement
[C#]
ICodeMethodInvokeStatement CreateMethodInvokeStatement(
   string[] target,
   ICodeClass targetType,
   string methodName,
   ICodeParameter[] parameters,
   bool designTime
);
[C++]
ICodeMethodInvokeStatement* CreateMethodInvokeStatement(
   String* target[],
   ICodeClass* targetType,
   String* methodName,
   ICodeParameter* parameters[],
   bool designTime
) = 0;
[JScript]
function CreateMethodInvokeStatement(
   target : String[],
   targetType : ICodeClass,
   methodName : String,
   parameters : ICodeParameter[],
   designTime : Boolean
) : ICodeMethodInvokeStatement;

Parameters

target
Array of names to invoke. These statement must be subobjects. For example, to create a method invoke expression for this code:
Panel1.Children.Add new Control()

You would need to pass in a string array that contained "Panel1" and "Children".

targetType
[To be supplied.]
methodName
The name of the method to invoke.
parameters
An array of ICodeParameter objects to invoke the method with.
designTime
Whether this method should only be available at design time. A design time method is commented in the persisted source code but interpreted at design time.

Return Value

The newly created method invoke statement.

See Also

ICodeSourceFile Interface | ICodeSourceFile Members | System.ComponentModel.Design.CodeModel Namespace | CreateParameter