请问将以下VB.NET代码
AppSettingsXml.Text = Chr(13) + Chr(10) + Server.HtmlEncode(appSettings.SectionInformation.GetRawXml());转换成为C#代码后是怎么样的代码。

解决方案 »

  1.   

    AppSettingsXml.Text = "\r\n" + Server.HtmlEncode(appSettings.SectionInformation.GetRawXml());
      

  2.   

    其实,除非非常反感VB.Net,否则不一定要重写代码。using Microsoft.VisualBasic.Strings;
    并且然后沿用vb.net的类似写法即可。vb.net的专有类库中有一些非常方便的函数,例如这个Microsoft.VisualBasic.Strings,以及Microsoft.VisualBasic.FileSystem之下的。