Add

PasswordDictionary.Add method

Adds a password for a document to the dictionary.

public void Add(string key, string password)
Parameter Type Description
key String The full file path or a document key.
password String The document password.

Exceptions

exception condition
ArgumentNullException Thrown when key or password is null.
ArgumentException Thrown when the dictionary contains a password for the document, the key is empty or contains a line break or an unpaired surrogate, or the password contains an unpaired surrogate.
InvalidOperationException The index of the dictionary is disposed.

See Also