System.Security.SecureString.InsertAt Method

Inserts a character in this secure string at the specified index position.

Syntax

[System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptions]
public void InsertAt (int index, char c)

Parameters

index
The index position where parameter c is inserted.
c
The character to insert.

Remarks

The index is zero-based and the first character in this secure string is at index position zero.

The value of the secure string, if any, is decrypted; c is inserted at the specified location; then the new value is encrypted. The SecureString.InsertAt(int, char) method yields the same results as the SecureString.AppendChar(char) method, which inserts a character at the end of a secure string, if the index parameter of SecureString.InsertAt(int, char) is set to the length of this instance.

Requirements

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0