RasEntryNameValidator Class

DotRas SDK

Collapse image Expand Image Copy image CopyHover image
Validates the format of an entry name for a phone book. This class cannot be inherited.

Namespace: DotRas
Assembly: DotRas (in DotRas.dll) Version: 1.3.5166.33435 (1.3.0.0)

Syntax

C#
public sealed class RasEntryNameValidator
Visual Basic
Public NotInheritable Class RasEntryNameValidator
Visual C++
public ref class RasEntryNameValidator sealed
F#
[<SealedAttribute>]
type RasEntryNameValidator =  class end

Remarks

The name must contain at least one non-whitespace alphanumeric character.

Examples

The following example shows how to use the RasEntryNameValidator to validate an entry does not already exist within a phone book. After the Validate()()()() method has been called, the IsValid property will indicate whether the entry name is valid.
C# Copy imageCopy
RasEntryNameValidator validator = new RasEntryNameValidator();
validator.EntryName = "VPN Connection";
validator.PhoneBookPath = RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.AllUsers);
validator.AllowExistingEntries = false;
validator.Validate();
Visual Basic Copy imageCopy
Dim validator As New RasEntryNameValidator
validator.EntryName = "VPN Connection"
validator.PhoneBookPath = RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.AllUsers)
validator.AllowExistingEntries = False
validator.Validate()

Inheritance Hierarchy

System..::..Object
  DotRas..::..RasEntryNameValidator

See Also