NET Password Generator
SpecialCharacterPosition Property
Example 



KellermanSoftware.NetPasswordGenerator Namespace > PasswordConfig Class : SpecialCharacterPosition Property
Define where special characters are placed when generated in a password. Default is Random
Syntax
'Declaration
 
Public Property SpecialCharacterPosition As Position
'Usage
 
Dim instance As PasswordConfig
Dim value As Position
 
instance.SpecialCharacterPosition = value
 
value = instance.SpecialCharacterPosition
public Position SpecialCharacterPosition {get; set;}
public:
property Position SpecialCharacterPosition {
   Position get();
   void set (    Position value);
}
Example
//Licensed Mode
//PasswordGenerator generator = new PasswordGenerator("User Name From Receipt", "License Key From Receipt");
 
//Trial Mode
PasswordGenerator generator = new PasswordGenerator();
generator.Config.ValidSpecialCharacters = "@#$";
generator.Config.MinSpecialCharacters = 1;
generator.Config.MaxSpecialCharacters = 1;
generator.Config.SpecialCharacterPosition = Position.Center;
 
string password = generator.Generate();
Console.WriteLine(password);
'Licensed Mode
'PasswordGenerator generator = new PasswordGenerator("User Name From Receipt", "License Key From Receipt");
 
'Trial Mode
Dim generator As New PasswordGenerator()
generator.Config.ValidSpecialCharacters = "@#$"
generator.Config.MinSpecialCharacters = 1
generator.Config.MaxSpecialCharacters = 1
generator.Config.SpecialCharacterPosition = Position.Center
 
Dim password As String = generator.Generate()
Console.WriteLine(password)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PasswordConfig Class
PasswordConfig Members