Mega Code Archive

 
Categories / VB.Net / LINQ
 

Shows all public methods in an assembly

Imports System.IO Imports System.Reflection Imports System.Linq Imports System.Xml.Linq Public Class MainClass    Public Shared Sub Main         Dim MethodList = From type In Assembly.GetExecutingAssembly.GetTypes(), _                               method In type.GetMembers() _                          Where method.MemberType = MemberTypes.Method _                                AndAlso CType(method, MethodInfo).IsPublic _                          Select Item = CType(method, MethodInfo) _                          Order By Item.Name         For Each m In MethodList             Console.WriteLine(m.Name)         Next    End Sub End Class