NET Password Generator
MaxWords Property
Example 



KellermanSoftware.NetPasswordGenerator Namespace > PasswordConfig Class : MaxWords Property
The maximum number of words to generate for a password. Default is 3
Syntax
'Declaration
 
Public Property MaxWords As Integer
'Usage
 
Dim instance As PasswordConfig
Dim value As Integer
 
instance.MaxWords = value
 
value = instance.MaxWords
public int MaxWords {get; set;}
public:
property int MaxWords {
   int get();
   void set (    int value);
}
Example
//Licensed Mode
//PasswordGenerator generator = new PasswordGenerator("User Name From Receipt", "License Key From Receipt");
 
//Trial Mode
PasswordGenerator generator = new PasswordGenerator();
 
generator.Config.MinLength = 15;
generator.Config.MaxLength = 20;
generator.Config.MinWords = 2;
generator.Config.MaxWords = 3;
 
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.MinLength = 15
generator.Config.MaxLength = 20
generator.Config.MinWords = 2
generator.Config.MaxWords = 3
 
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