再シャープ化は、HtmlTextWriter内のstring.Formatについて不平を言っています。
string.formatでHtmlTextWriterを使用するベストプラクティスは何ですか?
少し早いですがお礼を!
The point is that you do not need to use string.Format. You can just do this:
writer.Write("{0}",1);
See: http://msdn.microsoft.com/en-us/library/acsz4w2k.aspx
HtmlTextWriter.Write Method (String, Object[])
Writes a formatted string that contains the text representation of an object array to the output stream, along with any pending tab spacing. This method uses the same semantics as the String.Format method.
The Write
and WriteLine
methods on all of these classes can also take format parameters:
writer.Write("{0} {1}", x, y);