Mega Code Archive

 
Categories / VB.Net / Reflection
 

Get MethodA(i As Integer, ByRef r As Integer)

Imports System Imports System.Reflection Imports System.Runtime.InteropServices Class Program     Public Overloads Sub MethodA(ByVal i As Integer, ByVal l As Long)     End Sub     Public Overloads Sub MethodA(ByVal i() As Integer)     End Sub     Public Overloads Sub MethodA(ByRef r As Integer)     End Sub     Public Overloads Sub MethodA(ByVal i As Integer, <Out()> ByRef o As Integer)         o = 100     End Sub     Public Shared Sub Main(ByVal args() As String)         Dim mInfo As MethodInfo         mInfo = GetType(Program).GetMethod("MethodA", New Type() {GetType(Integer), _             GetType(Integer).MakeByRefType})         Console.WriteLine("Found method: {0}", mInfo)     End Sub End Class