Role.Name Property
Gets the name of the role as it is declared in the service definition file.
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
The following example shows how to retrieve the name of the role:
Trace.WriteLine("Role Name: " + RoleEnvironment.CurrentRoleInstance.Role.Name);
Show: