MemberInfo.Name gets the name of the current member. : MethodInfo « 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 » MethodInfoScreenshots 
MemberInfo.Name gets the name of the current member.
 

Imports System
Imports System.Reflection
Imports Microsoft.VisualBasic

Class Mymemberinfo
    Public Shared Function Main() As Integer
        Dim MyType As Type = Type.GetType("System.Empty")
        Dim Mymemberinfoarray As MemberInfo() = MyType.GetMembers()

        Console.WriteLine("There are {0} members in {1}", Mymemberinfoarray.GetLength(0), MyType.FullName)

        Dim Mymemberinfo As MemberInfo
        For Each Mymemberinfo In Mymemberinfoarray
            Console.WriteLine(Mymemberinfo.Name & " declaring type - " & Mymemberinfo.DeclaringType.ToString())
        Next Mymemberinfo

        Return 0
    End Function
End Class

   
  
Related examples in the same category
1.MethodInfo.GetBaseDefinition
2.MethodInfo.MemberType Property indicates that this member is a method.
3.MethodInfo.ReturnType gets the return type of this method.
4.MemberInfo Class contains information about the attributes of a member
5.Display the set of assemblies our assemblies reference
6.Display information about each assembly loading into this AppDomain.
7.Get members from a Type
8.MemberInfo.DeclaringType Property gets the class that declares this member.
9.MemberInfo.GetCustomAttributes
10.MemberInfo.MemberType indicates the type of the member, method, constructor, event.
11.MemberInfo.Module Property gets the module
12.MemberInfo.ReflectedType Property gets the class object that was used to obtain this instance of MemberInfo.
13.PropertyInfo Class represents the attributes of a property and provides access to property metadata.
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.