Purushottam Rathore
How to get all referenced assemblies?
By Purushottam Rathore in ASP.NET on Jul 21 2009
  • kalit sikka
    Aug, 2009 3

    To Display the list of referenced assemblies

    Imports System.Reflection

    Private Sub PopulateListView()

    'Get a list of referenced assemblies

    Dim assemblyNames() As System.Reflection.AssemblyName = [Assembly].GetExecutingAssembly.GetReferencedAssemblies

    Dim assemblyName As System.Reflection.AssemblyName

    Dim listViewItem As System.Windows.Forms.ListViewItem

    Dim i As Integer

    'Add each assemblies information to the listview

    For i = assemblyNames.GetLowerBound(0) To assemblyNames.GetUpperBound(0)

    assemblyName = CType(assemblyNames.GetValue(i), System.Reflection.AssemblyName)

    listViewItem = New System.Windows.Forms.ListViewItem

    listViewItem.Text = assemblyName.Name

    listViewItem.SubItems(1).Text = assemblyName.Version.ToString

    listView.Items.Add(listViewItem)

    Next i

    End Sub

    http://kalitinterviewquestions.blogspot.com/

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS