MarshalAsAttribute.MarshalTypeRef フィールドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > MarshalAsAttribute.MarshalTypeRef フィールドの意味・解説 

MarshalAsAttribute.MarshalTypeRef フィールド

MarshalAsAttribute.MarshalType を型として実装ます。

名前空間: System.Runtime.InteropServices
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ComVisibleAttribute(True)> _
Public MarshalTypeRef As Type
Dim instance As MarshalAsAttribute
Dim value As Type

value = instance.MarshalTypeRef

instance.MarshalTypeRef = value
[ComVisibleAttribute(true)] 
public Type MarshalTypeRef
[ComVisibleAttribute(true)] 
public:
Type^ MarshalTypeRef
/** @attribute ComVisibleAttribute(true) */ 
public Type MarshalTypeRef
ComVisibleAttribute(true) 
public var MarshalTypeRef : Type
解説解説

属性付きパラメータフィールド、または戻り値の型のカスタム マーシャラ型を指定するときは、MarshalTypeRef フィールドMarshalType フィールドいずれか使用できますMarshalTypeRef フィールドは、構文簡略化することによって、MarshalType をより簡単に使用できるようにします。次の例の 1 行目は MarshalType使用する場合構文、2 行目は MarshalTypeRef使用する場合構文です。

[MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Assembly, NameSpace.TypeName"]
 
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(NameSpace.TypeName)]

Type オブジェクト設定するには、C# では typeof を、Visual Basic では GetType を、C++ では typeid使用できますカスタム マーシャラの作成方法使用方法詳細については、「カスタム マーシャリング」を参照してください

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
MarshalAsAttribute クラス
MarshalAsAttribute メンバ
System.Runtime.InteropServices 名前空間
MarshalType


このページでは「.NET Framework クラス ライブラリ リファレンス」からMarshalAsAttribute.MarshalTypeRef フィールドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からMarshalAsAttribute.MarshalTypeRef フィールドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からMarshalAsAttribute.MarshalTypeRef フィールド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「MarshalAsAttribute.MarshalTypeRef フィールド」の関連用語

MarshalAsAttribute.MarshalTypeRef フィールドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



MarshalAsAttribute.MarshalTypeRef フィールドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS