Session.Name Property
Gets the name of the Session object.
Namespace: Microsoft.SqlServer.Management.XEvent
Assembly: Microsoft.SqlServer.Management.XEvent (in Microsoft.SqlServer.Management.XEvent.dll)
Syntax
'Declaration
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Required Or SfcPropertyFlags.ReadOnlyAfterCreation)> _
<SfcKeyAttribute()> _
Public Property Name As String
Get
Set
'Usage
Dim instance As Session
Dim value As String
value = instance.Name
instance.Name = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Required|SfcPropertyFlags.ReadOnlyAfterCreation)]
[SfcKeyAttribute()]
public string Name { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Required|SfcPropertyFlags::ReadOnlyAfterCreation)]
[SfcKeyAttribute()]
public:
property String^ Name {
String^ get ();
void set (String^ value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Required|SfcPropertyFlags.ReadOnlyAfterCreation)>]
[<SfcKeyAttribute()>]
member Name : string with get, set
function get Name () : String
function set Name (value : String)
Property Value
Type: System.String
The String which contains the name of the Session
Exceptions
Exception | Condition |
---|---|
XEventException | Set name for existing session or set name to null/empty string. |