summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Text/StringBuilder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Text/StringBuilder.cs')
-rw-r--r--src/mscorlib/src/System/Text/StringBuilder.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mscorlib/src/System/Text/StringBuilder.cs b/src/mscorlib/src/System/Text/StringBuilder.cs
index f20146fe00..72247c333e 100644
--- a/src/mscorlib/src/System/Text/StringBuilder.cs
+++ b/src/mscorlib/src/System/Text/StringBuilder.cs
@@ -41,7 +41,6 @@ namespace System.Text {
// Console.WriteLine(sb1);
// Console.WriteLine(sb2);
//
- [System.Runtime.InteropServices.ComVisible(true)]
[Serializable]
public sealed class StringBuilder : ISerializable
{
@@ -593,7 +592,7 @@ namespace System.Text {
throw new ArgumentOutOfRangeException(nameof(startIndex), Environment.GetResourceString("ArgumentOutOfRange_GenericPositive"));
}
if (charCount<0) {
- throw new ArgumentOutOfRangeException("count", Environment.GetResourceString("ArgumentOutOfRange_GenericPositive"));
+ throw new ArgumentOutOfRangeException(nameof(charCount), Environment.GetResourceString("ArgumentOutOfRange_GenericPositive"));
}
Contract.Ensures(Contract.Result<StringBuilder>() != null);
Contract.EndContractBlock();
@@ -605,7 +604,7 @@ namespace System.Text {
throw new ArgumentNullException(nameof(value));
}
if (charCount > value.Length - startIndex) {
- throw new ArgumentOutOfRangeException("count", Environment.GetResourceString("ArgumentOutOfRange_Index"));
+ throw new ArgumentOutOfRangeException(nameof(charCount), Environment.GetResourceString("ArgumentOutOfRange_Index"));
}
if (charCount==0) {
@@ -715,20 +714,17 @@ namespace System.Text {
}
}
- [System.Runtime.InteropServices.ComVisible(false)]
public StringBuilder AppendLine() {
Contract.Ensures(Contract.Result<StringBuilder>() != null);
return Append(Environment.NewLine);
}
- [System.Runtime.InteropServices.ComVisible(false)]
public StringBuilder AppendLine(string value) {
Contract.Ensures(Contract.Result<StringBuilder>() != null);
Append(value);
return Append(Environment.NewLine);
}
- [System.Runtime.InteropServices.ComVisible(false)]
public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count) {
if (destination == null) {
throw new ArgumentNullException(nameof(destination));
@@ -848,7 +844,7 @@ namespace System.Text {
}
if (length > Length - startIndex) {
- throw new ArgumentOutOfRangeException("index", Environment.GetResourceString("ArgumentOutOfRange_Index"));
+ throw new ArgumentOutOfRangeException(nameof(length), Environment.GetResourceString("ArgumentOutOfRange_Index"));
}
Contract.Ensures(Contract.Result<StringBuilder>() != null);
Contract.EndContractBlock();
@@ -1205,7 +1201,7 @@ namespace System.Text {
}
if (charCount < 0) {
- throw new ArgumentOutOfRangeException("count", Environment.GetResourceString("ArgumentOutOfRange_GenericPositive"));
+ throw new ArgumentOutOfRangeException(nameof(charCount), Environment.GetResourceString("ArgumentOutOfRange_GenericPositive"));
}
if (startIndex > value.Length - charCount) {