SafeArrayDefaultRankAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines the default rank of an array.
public ref class SafeArrayDefaultRankAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue, AllowMultiple=false, Inherited=false)]
public sealed class SafeArrayDefaultRankAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue, AllowMultiple=false, Inherited=false)>]
type SafeArrayDefaultRankAttribute = class
inherit Attribute
Public NotInheritable Class SafeArrayDefaultRankAttribute
Inherits Attribute
- Inheritance
-
SafeArrayDefaultRankAttribute
- Attributes
Remarks
For a host application that is based on COM, add the SafeArrayDefaultRankAttribute attribute in the proxy code to marshaled safe array parameters or return values to specify the actual rank of the arrays in question. This is needed because there is no differentiation between one-dimensional and multi-dimensional arrays in the COM type library. The COM safe arrays are converted to one-dimensional arrays in the proxy code by default. Also, use the SafeArrayDefaultRankAttribute attribute with parameters or return values of type Array or System.Object[]
that do not convey rank information.
Constructors
SafeArrayDefaultRankAttribute(Int32) |
Initializes a new instance of the SafeArrayDefaultRankAttribute class with a default rank. |
Properties
DefaultRank |
Gets the default rank of the array. |