public void TestInsertFormatLikeAppend() { var sb = new StringBuilder("<strong>emphasis</strong>"); sb.InsertFormat(26, " and other {0}.", "things"); Assert.AreEqual("<strong>emphasis</strong> and other things.", sb.ToString()); }
public void TestInsertFormat() { var sb = new StringBuilder("<strong>emphasis</strong>"); sb.InsertFormat(sb.LastIndexOf('<')," and other {0}.", "things"); Assert.AreEqual("<strong>emphasis and other things.</strong>", sb.ToString()); }