如何:获取当前的应用程序对象
此示例演示如何为当前的 AppDomain 获取对 Application 对象实例的引用。
示例
下面的示例演示如何从 Current 属性获取对当前 Application 对象实例的引用。
' Get a reference to the current Application object
Dim currentApplication As Application = Application.Current
// Get a reference to the current Application object
Application currentApplication = Application.Current;