ContextUtil.ApplicationInstanceId Property

Definition

Gets a GUID for the current application instance.

C#
public static Guid ApplicationInstanceId { get; }

Property Value

The GUID for the current application instance.

Exceptions

There is no COM+ context available.

The platform is not Windows XP or later.

Examples

The following code example gets the value of a ApplicationInstanceId property.

C#
[Synchronization(SynchronizationOption.Required)]
public class ContextUtil_ApplicationInstanceId : ServicedComponent
{
    public void Example()
    {
        // Display the ApplicationInstanceId associated with the current COM+
        // context.
        Console.WriteLine("Application Instance ID: {0}",
            ContextUtil.ApplicationInstanceId);
    }
}

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1