String.Format exception when format string contains “{”
问题 I am using VSTS 2008 + C# + .Net 2.0. When executing the following statement, there is FormatException thrown from String.Format statement, any ideas what is wrong? Here is where to get the template.html I am using. I want to format this part m={0} in template.html. string template = String.Empty; using (StreamReader textFile = new StreamReader("template.html")) { template = textFile.ReadToEnd(); String.Format(template, "video.wmv"); } http://www.mediafire.com/download.php?u4myvhbmmzg EDIT 1: