Get the record for an existing label from the repository.

Namespace: Perforce.P4
Assembly: p4api.net (in p4api.net.dll) Version: 2017.3.160.836 (2017.3.160.0836)

Syntax

C#
public Label GetLabel(
	string label,
	string template,
	Options options
)
Visual Basic
Public Function GetLabel ( _
	label As String, _
	template As String, _
	options As Options _
) As Label
Visual C++
public:
Label^ GetLabel(
	String^ label, 
	String^ template, 
	Options^ options
)

Parameters

label
Type: System..::..String
Label name
template
Type: System..::..String
Template to use (if required)
options
Type: Perforce.P4..::..Options
Flags used when fetching an existing label

Return Value

The Label object if label was found, null if creation failed

Examples

To get the admin_label with the gobal option:
CopyC#
LabelCmdOptions opts = new LabelCmdOptions(LabelCmdFlags.Global,null);
Label label = rep.GetLabel("admin_label", null, opts);

See Also