Share via


ContextUtil.ApplicationId Özellik

Tanım

Geçerli uygulama için bir GUID alır.

public:
 static property Guid ApplicationId { Guid get(); };
public static Guid ApplicationId { get; }
static member ApplicationId : Guid
Public Shared ReadOnly Property ApplicationId As Guid

Özellik Değeri

Geçerli uygulamanın GUID değeri.

Özel durumlar

Kullanılabilir COM+ bağlamı yoktur.

Platform Windows XP veya sonraki bir sürüm değildir.

Örnekler

Aşağıdaki kod örneği bu özelliğin kullanımını gösterir.

protected:
   virtual void Activate() override
   {
      MessageBox::Show( String::Format( "Now entering...\nApplication: {0}\nInstance: {1}\nContext: {2}\n", ContextUtil::ApplicationId.ToString(), ContextUtil::ApplicationInstanceId.ToString(), ContextUtil::ContextId.ToString() ) );
   }
protected override void Activate()
{
    MessageBox.Show( String.Format("Now entering...\nApplication: {0}\nInstance: {1}\nContext: {2}\n",
                                   ContextUtil.ApplicationId.ToString(), ContextUtil.ApplicationInstanceId.ToString(),
                                   ContextUtil.ContextId.ToString() ) );
}
Protected Overrides Sub Activate() 
    MessageBox.Show(String.Format("Now entering..." + vbLf + "Application: {0}" + vbLf + "Instance: {1}" + vbLf + "Context: {2}" + vbLf, ContextUtil.ApplicationId.ToString(), ContextUtil.ApplicationInstanceId.ToString(), ContextUtil.ContextId.ToString()))

End Sub

Şunlara uygulanır