NamedComponentCollection.IsValidName Method
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.
Overloads
IsValidName(String, String) |
Determines whether the provided name is valid for a component in the collection. |
IsValidName(String) |
Determines whether the provided name is valid for a component in the collection. |
IsValidName(String, Type, String) |
Determines whether the provided name is valid for a component in the collection. |
IsValidName(String, String)
Determines whether the provided name is valid for a component in the collection.
public virtual bool IsValidName (string name, out string error);
abstract member IsValidName : string * string -> bool
override this.IsValidName : string * string -> bool
Public Overridable Function IsValidName (name As String, ByRef error As String) As Boolean
Parameters
- name
- String
The name to validate.
- error
- String
The error that will occur if the provided name is not valid.
Returns
true if the name is valid for a component in collection; otherwise, false.
Applies to
IsValidName(String)
Determines whether the provided name is valid for a component in the collection.
public bool IsValidName (string name);
member this.IsValidName : string -> bool
Public Function IsValidName (name As String) As Boolean
Parameters
- name
- String
The name to validate.
Returns
true if the name is valid for a component in collection; otherwise, false.
Applies to
IsValidName(String, Type, String)
Determines whether the provided name is valid for a component in the collection.
protected bool IsValidName (string name, Type type, out string error);
member this.IsValidName : string * Type * string -> bool
Protected Function IsValidName (name As String, type As Type, ByRef error As String) As Boolean
Parameters
- name
- String
The name to validate.
- type
- Type
The type of the component.
- error
- String
The error that will occur if the provided name is not valid.
Returns
true if the name is valid for a component in collection; otherwise, false.
Remarks
For internal use.