本文整理汇总了VB.NET中System.AppDomain.GetAssemblies方法的典型用法代码示例。如果您正苦于以下问题:VB.NET AppDomain.GetAssemblies方法的具体用法?VB.NET AppDomain.GetAssemblies怎么用?VB.NET AppDomain.GetAssemblies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.AppDomain
的用法示例。
在下文中一共展示了AppDomain.GetAssemblies方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: ADGetAssemblies
' 导入命名空间
Imports System.Reflection
Imports System.Security.Policy
Class ADGetAssemblies
Public Shared Sub Main()
Dim currentDomain As AppDomain = AppDomain.CurrentDomain
'Provide the current application domain evidence for the assembly.
Dim asEvidence As Evidence = currentDomain.Evidence
'Load the assembly from the application directory using a simple name.
'Create an assembly called CustomLibrary to run this sample.
currentDomain.Load("CustomLibrary", asEvidence)
'Make an array for the list of assemblies.
Dim assems As [Assembly]() = currentDomain.GetAssemblies()
'List the assemblies in the current application domain.
Console.WriteLine("List of assemblies loaded in current appdomain:")
Dim assem As [Assembly]
For Each assem In assems
Console.WriteLine(assem.ToString())
Next assem
End Sub
End Class