Role.Name Property
Gets the name of the role as it is declared in the service definition file.
Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
Syntax
public abstract string Name { get; internal set; }
public:
property String^ Name {
virtual String^ get() abstract;
internal: virtual void set(String^ value) abstract;
}
abstract Name : string with get, internal set
Public MustOverride Property Name As String
Get
Friend Set
End Property
Property Value
Type: System.String
Type: System.String
A String that contains the name of the role.
Remarks
The following example shows how to retrieve the name of the role:
Trace.WriteLine("Role Name: " + RoleEnvironment.CurrentRoleInstance.Role.Name);
See Also
RoleEnvironment
RoleInstance
Role Class
Microsoft.WindowsAzure.ServiceRuntime Namespace
Return to top