LocalVariableInfo Class (System.Reflection)_VB.htm : PropertyInfo « Reflection « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » Reflection » PropertyInfoScreenshots 
LocalVariableInfo Class (System.Reflection)_VB.htm
 

Imports System
Imports System.Reflection

Public Class Example
    Public Shared Sub Main()
        Dim As New Example()
        Console.WriteLine()
        e.MethodBodyExample("String argument")
        e.MethodBodyExample(Nothing)

        Dim mi As MethodInfo = GetType(Example).GetMethod("MethodBodyExample")
        Dim mb As MethodBody = mi.GetMethodBody()
        Console.WriteLine(mi)

        Console.WriteLine(mb.InitLocals)
        Console.WriteLine(mb.MaxStackSize)

        
        For Each lvi As LocalVariableInfo In mb.LocalVariables
            Console.WriteLine("Local variable: {0}", lvi)
        Next

    End Sub
    Public Sub MethodBodyExample(ByVal arg As Object)
        Dim var1 As Integer = 42
        Dim var2 As String = "Forty-two"
    End Sub
End Class

   
  
Related examples in the same category
1.PropertyInfo.Attributes Property gets the attributes for this property.
2.PropertyInfo.CanRead
3.PropertyInfo.CanWrite
4.PropertyInfo.GetAccessors
5.PropertyInfo.GetGetMethod returns the public or non-public get accessor for this property.
6.Get and display the GetGetMethod Method for each property
7.Display the GetGetMethod without using the MethodInfo
8.PropertyInfo.GetIndexParameters
9.Get Index Parameters
10.PropertyInfo.GetSetMethod
11.Display the GetSetMethod without using the MethodInfo
12.PropertyInfo.MemberType
13.PropertyInfo.PropertyType Property
14.PropertyInfo.SetValue
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.