Main Content
Work with .NET Methods Having Multiple Signatures
To create the NetSample
assembly, see Build a .NET Application for MATLAB Examples.
The SampleMethodSignature
class defines the three constructors
shown in the following table.
Return Type | Name | Arguments |
---|---|---|
netdoc.SampleMethodSignature obj | SampleMethodSignature | |
netdoc.SampleMethodSignature obj | SampleMethodSignature | (double scalar d) |
netdoc.SampleMethodSignature obj | SampleMethodSignature | (System.String s) |
Display Function Signature Example
If you have not already loaded the NetSample
assembly,
type:
NET.addAssembly('c:\work\NetSample.dll')
Create a SampleMethodSignature
object
obj
:
obj = netdoc.SampleMethodSignature;
To see the method signatures, type:
methods(obj, '-full')
Look for the following signatures in the MATLAB® output:
netdoc.SampleMethodSignature obj SampleMethodSignature netdoc.SampleMethodSignature obj SampleMethodSignature(double scalar d) netdoc.SampleMethodSignature obj SampleMethodSignature(System.String s)
For more information about argument types, see Handle Data Returned from .NET Objects.