Type.IsAutoLayout プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Type.IsAutoLayout プロパティの意味・解説 

Type.IsAutoLayout プロパティ

Type に、クラスレイアウト属性として AutoLayout選択されているかどうかを示す値を取得します

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

Dim instance As Type
Dim value As Boolean

value = instance.IsAutoLayout
public bool IsAutoLayout { get;
 }
/** @property */
public final boolean get_IsAutoLayout ()

プロパティ
Type に、クラスレイアウト属性として AutoLayout選択されている場合trueそれ以外場合false

解説解説
使用例使用例

型のインスタンス作成しIsAutoLayout プロパティ表示する例を次に示します

Imports System
Imports System.Runtime.InteropServices
Imports Microsoft.VisualBasic

' The Demo class is has the AutoLayout attribute.
<StructLayoutAttribute(LayoutKind.Auto)> _
Public Class Demo
End Class 

Public Class Example
    Public Shared Sub Main()
        ' Get the Type object for the Demo class.
        Dim myType As Type = GetType(Demo)
        ' Get and display the IsAutoLayout property of the 
        ' Demo class.
        Console.WriteLine("The AutoLayout property for
 the Demo class is '{0}'.",
 _
            myType.IsAutoLayout.ToString())
    End Sub 
End Class 
using System;
using System.Runtime.InteropServices;

// The Demo class is attributed as AutoLayout.
[StructLayoutAttribute(LayoutKind.Auto)]
public class Demo
{
}

public class Example
{
    public static void Main()
    {
        // Create an instance of the Type class using the GetType method.
        Type  myType=typeof(Demo);
        // Get and display the IsAutoLayout property of the 
        // Demoinstance.
        Console.WriteLine("\nThe AutoLayout property for
 the Demo class is {0}.",
            myType.IsAutoLayout); 
    }
}
#using <System.dll>

using namespace System;
using namespace System::Reflection;
using namespace System::ComponentModel;
using namespace System::Runtime::InteropServices;

// The MyDemoAttribute class is selected as AutoLayout.

[StructLayoutAttribute(LayoutKind::Auto)]
public ref class MyDemoAttribute{};

void MyAutoLayoutMethod( String^ typeName )
{
   try
   {
      
      // Create an instance of the Type class using the GetType method.
      Type^ myType = Type::GetType( typeName );
      
      // Get and display the IsAutoLayout property of the
      // MyDemoAttribute instance.
      Console::WriteLine( "\nThe AutoLayout property for
 the MyDemoAttribute is {0}.", myType->IsAutoLayout );
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( "\nAn exception occurred: {0}.", e->Message
 );
   }

}

int main()
{
   MyAutoLayoutMethod( "MyDemoAttribute" );
}

import System.*;
import System.Reflection.*;
import System.ComponentModel.*;
import System.Runtime.InteropServices.*;

// The MyDemoAttribute class is selected as AutoLayout.
/** @attribute StructLayoutAttribute(LayoutKind.Auto)
 */
public class MyDemoAttribute
{
} //MyDemoAttribute

public class MyTypeClass
{
    public static void main(String[]
 args)
    {
        MyAutoLayoutMethod("MyDemoAttribute");
    } //main

    public static void MyAutoLayoutMethod(String
 typeName)
    {
        try {
            // Create an instance of the Type class using the GetType
 method.
            Type myType = Type.GetType(typeName);
            // Get and display the IsAutoLayout property of the 
            // MyDemoAttribute instance.
            Console.WriteLine("\nThe AutoLayout property for
 the" 
                + " MyDemoAttribute is {0}.", System.Convert.ToString(myType.
                get_IsAutoLayout()));
        }
        catch (System.Exception e) {
            Console.WriteLine("\nAn exception occurred: {0}.", e.get_Message());
        }
    } //MyAutoLayoutMethod
} //MyTypeClass
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

_Type.IsAutoLayout プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

COM オブジェクトに、Type.IsAutoLayout プロパティへのバージョン依存しないアクセス用意されています。

このプロパティは、CLS準拠していません。  

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

Dim instance As _Type
Dim value As Boolean

value = instance.IsAutoLayout
bool IsAutoLayout { get; }
property bool IsAutoLayout {
    bool get ();
}
/** @property */
boolean get_IsAutoLayout ()
function get IsAutoLayout () : boolean

プロパティ
Type に、クラスレイアウト属性として AutoLayout選択されている場合trueそれ以外場合false

解説解説

このプロパティは、アンマネージ コードからマネージ クラスアクセスするためのプロパティであるため、マネージ コードからは呼び出さないください

Type.IsAutoLayout プロパティは、Type に、クラスレイアウト属性として AutoLayout選択されているかどうかを示す値を取得します

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「Type.IsAutoLayout プロパティ」の関連用語

Type.IsAutoLayout プロパティのお隣キーワード
検索ランキング

   

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



Type.IsAutoLayout プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS