本文整理汇总了VB.NET中System.AppDomainSetup.ApplicationBase属性的典型用法代码示例。如果您正苦于以下问题:VB.NET AppDomainSetup.ApplicationBase属性的具体用法?VB.NET AppDomainSetup.ApplicationBase怎么用?VB.NET AppDomainSetup.ApplicationBase使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了AppDomainSetup.ApplicationBase属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: ADSetupInformation
Class ADSetupInformation
Shared Sub Main()
Dim root As AppDomain = AppDomain.CurrentDomain
Dim setup As New AppDomainSetup()
setup.ApplicationBase = _
root.SetupInformation.ApplicationBase & "MyAppSubfolder\"
Dim domain As AppDomain = AppDomain.CreateDomain("MyDomain", Nothing, setup)
Console.WriteLine("Application base of {0}:" & vbCrLf & vbTab & "{1}", _
root.FriendlyName, root.SetupInformation.ApplicationBase)
Console.WriteLine("Application base of {0}:" & vbCrLf & vbTab & "{1}", _
domain.FriendlyName, domain.SetupInformation.ApplicationBase)
AppDomain.Unload(domain)
End Sub
End Class
输出:
Application base of MyApp.exe: C:\Program Files\MyApp\ Application base of MyDomain: C:\Program Files\MyApp\MyAppSubfolder\