public string Welcome(string name, int ID = 1) { return HttpUtility.HtmlEncode("Hello " + name + ", ID: " + ID); }
public string Welcome(string name, int numTimes = 1) { return HttpUtility.HtmlEncode("Hello " + name + ", NumTimes is: " + numTimes); }尽量采用HttpUtility.Encode 和HttpUtility.Decode方法,防止乱码等情况
时间: 2024-10-30 20:09:15