Partager via


Propriété CategoryID

Gets the ID value that uniquely identifies the job category.

Espace de noms :  Microsoft.SqlServer.Management.Smo.Agent
Assembly :  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
<SfcKeyAttribute()> _
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property CategoryID As Integer
    Get
'Utilisation
Dim instance As Job
Dim value As Integer

value = instance.CategoryID
[SfcKeyAttribute()]
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public int CategoryID { get; }
[SfcKeyAttribute()]
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property int CategoryID {
    int get ();
}
[<SfcKeyAttribute()>]
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member CategoryID : int
function get CategoryID () : int

Valeur de propriété

Type : System. . :: . .Int32
A In32 value that specifies the job category ID value.

Notes

The ID value references the category to which the job belongs. You can define the category using the JobCategory object.

Exemples

The following code example specifies that the job belongs to category 1.

C#

Job jb = new Job();
jb.CategoryID = 1;

PowerShell

$jb = new-object Microsoft.SqlServer.Management.Smo.Agent.Job
$jb.CategoryID = 1