public static void Item_Get_Set_InvalidIndex()
{
var builder = new StringBuilder("Hello");
Assert.Throws<IndexOutOfRangeException>(() => builder[-1]); // Index < 0
Assert.Throws<IndexOutOfRangeException>(() => builder[5]); // Index >= string.Length
Assert.Throws<ArgumentOutOfRangeException>("index", () => builder[-1] = 'a'); // Index < 0
Assert.Throws<ArgumentOutOfRangeException>("index", () => builder[5] = 'a'); // Index >= string.Length
}