User`s guide
R2011b
8-18
Compatibility Considerations
If your MEX-file uses the char16_t type, you must include the appropriate header
file for your compiler in order to build the MEX-file. For example, the header file for
Microsoft Visual Studio Version 10.0 is yvals.h.
New Support for Features in Microsoft .NET Framework
• “Support for Cell Arrays” on page 8-18
• “Support for Auto-Conversion of Multidimensional Arrays” on page 8-18
Support for Cell Arrays
Creating Cell Arrays from .NET Stings and Objects
Use the MATLAB cell function to convert .NET System.String and System.Object
arrays to MATLAB cell arrays. For more information, see Converting .NET Arrays to
Cell Arrays.
Passing Cell Arrays to .NET Methods
If an input argument to a .NET property or method is an array of System.Object or
System.String, you can pass a cell array. MATLAB automatically converts a cell array
into the appropriate .NET array. For more information, see Pass Cell Arrays.
Support for Auto-Conversion of Multidimensional Arrays
You can pass MATLAB arrays directly to .NET without explicitly converting them
into .NET arrays. MATLAB also converts an array of a lower dimensionality to a higher
dimensionality .NET array. For more information, see Pass Arrays.
Compatibility Considerations
In most cases, you no longer need to use the NET.convertArray function. Review
your MATLAB code to update the use of this function. If you continue to use
NET.convertArray, note the following change of behavior for empty matrices:
• If you call NET.convertArray with an N-D empty matrix and try to convert it to 1-
D .NET array, MATLAB throws the following error:
Source and destination array dimension sizes do not match.