Mega Code Archive

 
Categories / VB.Net / Reflection
 

Type IsAutoLayout tells whether the class layout attribute AutoLayout is selected for the Type

Imports System Imports System.Runtime.InteropServices Imports Microsoft.VisualBasic <StructLayoutAttribute(LayoutKind.Auto)> _ Public Class Demo End Class Public Class Example     Public Shared Sub Main()         Dim myType As Type = GetType(Demo)         Console.WriteLine(myType.IsAutoLayout.ToString())     End Sub End Class