System.Security.SecureString.SetAt Method

Replaces the existing character at the specified index position with another character.

Syntax

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

Parameters

index
The index position of an existing character in this secure string
c
A character that replaces the existing character.

Remarks

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

The value of the secure string, if any, is decrypted; c is assigned to the specified index position; then the new value is encrypted.

Requirements

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