using System.Runtime.ConstrainedExecution;
using System.Security.Cryptography;
using System.Security.Permissions;
-#if NET_4_0
using System.Runtime.ExceptionServices;
-#endif
namespace System.Security {
}
}
-#if NET_4_0
[HandleProcessCorruptedStateExceptions]
-#endif
public void AppendChar (char c)
{
if (disposed)
length = 0;
}
-#if NET_4_0
[HandleProcessCorruptedStateExceptions]
-#endif
public void InsertAt (int index, char c)
{
if (disposed)
read_only = true;
}
-#if NET_4_0
[HandleProcessCorruptedStateExceptions]
-#endif
public void RemoveAt (int index)
{
if (disposed)
try {
Decrypt ();
- Buffer.BlockCopy (data, index + 1, data, index, data.Length - index - 1);
+ Buffer.BlockCopy (data, index * 2 + 2, data, index * 2, data.Length - index * 2 - 2);
Alloc (--length, true);
}
finally {
}
}
-#if NET_4_0
[HandleProcessCorruptedStateExceptions]
-#endif
public void SetAt (int index, char c)
{
if (disposed)