Alternative to HttpUtility for .NET 3.5 SP1 client framework?

后端 未结 7 2219
温柔的废话
温柔的废话 2020-12-30 08:31

It\'d be really nice to target my Windows Forms app to the .NET 3.5 SP1 client framework. But, right now I\'m using the HttpUtility.HtmlDecode and

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-30 08:34

    Found today from this here little site that HtmlEncode/Decode can be done using System.Net library in C# 4.0 Client Profile:

    Uri.EscapeDataString(...)
    WebUtility.HtmlEncode(...)
    

    Edit: I re-read that the question applied for the 3.5 Client Framework but maybe this can be useful those who have updated 4.0..

提交回复
热议问题