MathWorks.MATLAB.NET.Arrays.MWObjectArray Class
Namespace: MathWorks.MATLAB.NET.Arrays
Wrap native .NET object in MATLAB array type
Description
MWObjectArray
is a special subclass of MWArray
that
wraps a native .NET object in a MATLAB array type that can then be accessed or returned by a
MATLAB function.
This class is used to pass or return a .NET object by reference to or from a MATLAB function. The object is referenced in MATLAB using the MATLAB Interface to .NET.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Properties
Public Properties
This property is read-only.
Syntax
public MWArrayType ArrayType { get; }
MWArrayType
object.This property is read-only.
This property is read-only.
Syntax
public static MWObjectArray Empty { get; }
This property is read-only.
This property is read-only.
This property is read-only.
Syntax
public virtual bool IsDisposed { get; }
This property is read-only.
This property is read-only.
This property is read-only.
This property is read-only.
This property is read-only.
Syntax
public MWArray this[
params int[] indices
] { get; set; }
Array indexing in this API, as in MATLAB®, is one-based rather than zero-based.
This property is read-only.
This property is read-only.
Syntax
public int NumberOfElements { get; }
prod(size(A))
for non-empty arrays. See numel
.This property is read-only.
Syntax
public Object Object { get; set; }
Methods
These methods specialize standard MATLAB operators and functions for objects in this class.
MWObjectArray() | Syntax public MWObjectArray() The
default constructor creates an empty |
MWObjectArray(Object) | Syntax public MWObjectArray( Object obj ) Parameters obj Type: System.Object A native .NET object |
MWObjectArray(SerializationInfo, StreamingContext) | Syntax protected MWObjectArray( SerializationInfo serializationInfo, StreamingContext context ) Parameters serializationInfo Type: System.Runtime.Serialization.SerializationInfo Holds the data needed to serialize or deserialize the object. context Type: System.Runtime.Serialization.StreamingContext Describes the source and destination of the serialized stream. Note: the arguments for this constructor are supplied by the .NET serialization infrastructure. |
Clone | Syntax public virtual Object Clone() Makes
a deep copy of an |
Dispose() | Syntax public void Dispose() Releases
resources of the |
Dispose(Boolean) | Syntax protected override void Dispose( bool disposing )
Internal dispose function |
Equals(Object) | Syntax public override bool Equals(
Objectobj
) Compares two |
Equals(MWObjectArray) | Syntax public override bool Equals(
MWObjectArrayobj
) Parameters obj Type: MathWorks.MATLAB.NET.Arrays.MWObjectArray An instance of MWObjectArray Return Value Type: Boolean The result of the comparison for equality Implements IEquatable<T>.Equals(T) Compares the two encapsulated .NET objects for reference equality; that is, they must be the same object. |
Finalize | Inherited from |
GetHashCode | Syntax public override int GetHashCode() Returns
the hashcode of the |
GetObjectData | Syntax public virtual void GetObjectData( SerializationInfoinfo, StreamingContextcontext )
Implements ISerializable.GetObjectData(SerializationInfo, StreamingContext) Serialization function. The arguments for this function are supplied by the .NET serialization infrastructure. |
GetType | Inherited from |
MemberwiseClone | Inherited from |
ToArray | Syntax public virtual Array ToArray() Returns
a native .NET array containing a copy of data in the underlying MATLAB array. The
returned array has the same dimensionality as the underlying MATLAB array. The
elements of the returned array are converted according to default conversion
rules. If the underlying MATLAB array is a complex numeric type,
|
ToString | Syntax public virtual Array ToArray() Returns
a formatted string representing the contents of the
|
These methods specialize standard MATLAB operators and functions for objects in this class.
Equality | Syntax public static bool operator ==( MWObjectArray objectArrayA, MWObjectArray objectArrayB ) Parameters objectArrayA Type: MathWorks.MATLAB.NET.Arrays.MWObjectArray An instance of
objectArrayB Type: MathWorks.MATLAB.NET.Arrays.MWObjectArray An instance of
Return Value Type: Boolean The result of the comparison for equality |
Inequality | Syntax public static bool operator !=( MWObjectArray objectArrayA, MWObjectArray objectArrayB ) Parameters objectArrayA Type: MathWorks.MATLAB.NET.Arrays.MWObjectArray An instance of
objectArrayB Type: MathWorks.MATLAB.NET.Arrays.MWObjectArray An instance of
Return Value Type: Boolean The result of the comparison for inequality |
Inheritance Hierarchy
System.Object
Mathworks.MATLAB.NET.Arrays.MWArray
Mathworks.MATLAB.NET.Arrays.MWCellArray
Mathworks.MATLAB.NET.Arrays.MWCharArray
Mathworks.MATLAB.NET.Arrays.MWIndexArray
Mathworks.MATLAB.NET.Arrays.MWObjectArray
Mathworks.MATLAB.NET.Arrays.MWStringArray
Mathworks.MATLAB.NET.Arrays.MWStructArray
Version History
Introduced in R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)