System.Text.Tests.StringBuilderTests.Append_Decimal_NoSpareCapacity_ThrowsArgumentOutOfRangeException C# (CSharp) 메소드

Append_Decimal_NoSpareCapacity_ThrowsArgumentOutOfRangeException() 개인적인 메소드

        public static void Append_Decimal_NoSpareCapacity_ThrowsArgumentOutOfRangeException()
        {
            var builder = new StringBuilder(0, 5);
            builder.Append("Hello");

            Assert.Throws<ArgumentOutOfRangeException>("valueCount", () => builder.Append((decimal)1)); // New length > builder.MaxCapacity
        }
StringBuilderTests