ApplicationNameAttribute Constructor

Initializes a new instance of the ApplicationNameAttribute class, specifying the name of the COM+ application to be used for the install of the components.

Namespace:  System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

public ApplicationNameAttribute(
	string name
)

Parameters

name
Type: System.String

The name of the COM+ application.

The following example illustrates the use of this attribute to mark a ServicedComponent class.

using System;
using System.EnterpriseServices;

[assembly: ApplicationName("Calculator")]
[assembly: ApplicationActivation(ActivationOption.Library)]
[assembly: System.Reflection.AssemblyKeyFile("Calculator.snk")]
public class Calculator : ServicedComponent
{
    public int Add (int x, int y)
    {
        return(x+y);
    }
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft