通过本文主要向大家介绍了c#字符串方法,c#字符串常用方法,c#常用字符串处理方法,c#字符串加密解密,c#字符串截取等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
public static string encode(string str) { string htext = ""; for (int i = 0; i < str.Length; i++) { htext = htext + (char)(str[i] + 10 - 1 * 2); } return htext; } public static string decode(string str) { string dtext = ""; for (int i = 0; i < str.Length; i++) { dtext = dtext + (char)(str[i] - 10 + 1 * 2); } return dtext; }</div> </div>