SafeArrayDefaultRankAttribute Class

 

Defines the default rank of an array.

Namespace:   Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly:  Microsoft.VisualStudio.Tools.Applications.Runtime (in Microsoft.VisualStudio.Tools.Applications.Runtime.dll)

System::Object
  System::Attribute
    Microsoft.VisualStudio.Tools.Applications.Runtime::SafeArrayDefaultRankAttribute

[AttributeUsageAttribute(AttributeTargets::Parameter | AttributeTargets::ReturnValue, 
	AllowMultiple = false, Inherited = false)]
public ref class SafeArrayDefaultRankAttribute sealed : Attribute

NameDescription
System_CAPS_pubmethodSafeArrayDefaultRankAttribute(Int32)

Initializes a new instance of the SafeArrayDefaultRankAttribute class with a default rank.

NameDescription
System_CAPS_pubpropertyDefaultRank

Gets the default rank of the array.

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object^)

(Inherited from Attribute.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

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.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: