The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
AppDomain::CurrentDomain Property
.NET Framework (current version)
Gets the current application domain for the current Thread.
Assembly: mscorlib (in mscorlib.dll)
The following code example creates a new application domain. The CurrentDomain property is used to obtain an AppDomain object that represents the current application domain. The FriendlyName property provides the name of the current application domain, which is then displayed at the command line.
using namespace System; int main() { AppDomain^ root = AppDomain::CurrentDomain; AppDomainSetup^ setup = gcnew AppDomainSetup(); setup->ApplicationBase = root->SetupInformation->ApplicationBase + "MyAppSubfolder\\"; AppDomain^ domain = AppDomain::CreateDomain("MyDomain", nullptr, setup); Console::WriteLine("Application base of {0}:\r\n\t{1}", root->FriendlyName, root->SetupInformation->ApplicationBase); Console::WriteLine("Application base of {0}:\r\n\t{1}", domain->FriendlyName, domain->SetupInformation->ApplicationBase); AppDomain::Unload(domain); } /* This example produces output similar to the following: Application base of MyApp.exe: C:\Program Files\MyApp\ Application base of MyDomain: C:\Program Files\MyApp\MyAppSubfolder\ */
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: