| Contents | Index |
Invoke generic method of object
[varargout] = NET.invokeGenericMethod(obj, 'genericMethodName',
paramTypes, args, ...)
[varargout] = NET.invokeGenericMethod(obj, 'genericMethodName', paramTypes, args, ...) calls instance or static generic method genericMethodName.
| obj | Allowed argument types are:
|
| genericMethodName | Generic method name to invoke |
| paramTypes | Cell vector (1 to N) with the types for generic method parameterization, where allowed cell types are:
|
| args | Optional, variable length (0 to N) list of method arguments |
| varargout | Variable-length output argument list, varargout, from method genericMethodName |
Use the following syntax to call a generic method that takes two parameterized types and returns a parameterized type:
a = NET.invokeGenericMethod(obj, ...
'myGenericSwapMethod', ...
{'System.Double', 'System.Double'}, ...
5, 6);To display generic methods in MATLAB, see the example Display .NET Generic Methods Using Reflection.
NET.createGeneric | NET.GenericClass | varargout

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |