Invokes a method on the current scriptable object, and optionally passes in one or more method parameters.
Assembly: System.Windows.Browser (in System.Windows.Browser.dll)
'Declaration Public Overridable Function Invoke ( _ name As String, _ ParamArray args As Object() _ ) As Object
public virtual Object Invoke( string name, params Object args )
The method to invoke.
Parameters to be passed to the method.
name is nulla null reference (Nothing in Visual Basic).
name is an empty string.
name contains an embedded null character (\0).
The method does not exist or is not scriptable.
The underlying method invocation results in an error. The .NET Framework attempts to return the error text that is associated with the error.
If args is nulla null reference (Nothing in Visual Basic), it is interpreted as an empty parameter list. As a result, passing nulla null reference (Nothing in Visual Basic) is the same as passing new object.
The actual type of the return value is always a string, a primitive type, or a ScriptObject reference. If the underlying value of the requested property is a managed type (other than a derivation of ScriptObject), you can use the ManagedObject property to get the underlying managed type reference.
// Fetch the sixth item in a collection. Invoke("item",5); // Fetch address item from dictionary. Invoke("item","address");
Supported in: 5, 4, 3
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.