Trustee Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the Trustee class.
Overloads
Trustee() |
Initializes a new instance of the Trustee class without setting any of its read/write properties. |
Trustee(String) |
Initializes a new instance of the Trustee class of type |
Trustee(String, String) |
Initializes a new instance of the Trustee class of type |
Trustee(String, String, TrusteeType) |
Initializes a new instance of the Trustee class of the specified type, setting the Name and the SystemName properties to the values specified. |
Trustee()
Initializes a new instance of the Trustee class without setting any of its read/write properties.
public:
Trustee();
public Trustee ();
Public Sub New ()
Remarks
You must specify a value for the Name property before using the Trustee instance to set permissions. Optionally, you can set the SystemName property to identify the name of the system on which the trustee account is looked up to resolve the name's security identifier. If you do not specify a value for SystemName, the local computer looks up the account name.
Applies to
Trustee(String)
Initializes a new instance of the Trustee class of type Unknown
, setting the Name property to the value specified, and the SystemName to null
.
public:
Trustee(System::String ^ name);
public Trustee (string name);
new System.Messaging.Trustee : string -> System.Messaging.Trustee
Public Sub New (name As String)
Parameters
Exceptions
The name
parameter is null
.
Remarks
Use this overload to set the trustee account and specify that the local computer be used to look up the account. The TrusteeType property is set to Unknown
, but you can modify that value before using this instance of Trustee to set permissions.
See also
Applies to
Trustee(String, String)
public:
Trustee(System::String ^ name, System::String ^ systemName);
public Trustee (string name, string systemName);
new System.Messaging.Trustee : string * string -> System.Messaging.Trustee
Public Sub New (name As String, systemName As String)
Parameters
- systemName
- String
The value to assign to the SystemName property.
Exceptions
The name
parameter is null
.
Remarks
Use this overload to set the trustee account and specify that a network computer be used to look up the account. The TrusteeType property is set to Unknown
, but you can modify that value before using this instance of Trustee to set permissions.
See also
Applies to
Trustee(String, String, TrusteeType)
Initializes a new instance of the Trustee class of the specified type, setting the Name and the SystemName properties to the values specified.
public:
Trustee(System::String ^ name, System::String ^ systemName, System::Messaging::TrusteeType trusteeType);
public Trustee (string name, string systemName, System.Messaging.TrusteeType trusteeType);
new System.Messaging.Trustee : string * string * System.Messaging.TrusteeType -> System.Messaging.Trustee
Public Sub New (name As String, systemName As String, trusteeType As TrusteeType)
Parameters
- systemName
- String
The value to assign to the SystemName property.
- trusteeType
- TrusteeType
A TrusteeType that indicates the account type of the trustee.
Exceptions
The name
parameter is null
.
Remarks
Use this overload when the trustee type is known to set the trustee account and specify a network computer to be used to look up the account.
This overload sets the TrusteeType property at construction, but you can modify that value before using this instance of Trustee to set permissions. The Unknown
trustee type (which the other overloads of the constructor set by default) should be used only when you do not know the kind of trust that is being used, but know that it is valid.