XFEExtension
【DLL】XFE各类拓展是一个C#的DLL库,旨在优化C#代码中常用语句的使用,并提供更简洁的访问方式,同时提供Xunit测试框架,快速搭建服务器/客户端,免费ChatGPTAPI接口,免费通讯服务器,XFE下载器,新增格式等
关注
0
Fork
0
Star
0
返回提交历史
Modified
XFE各类拓展/ListExtension.cs
+2
-6
XFEstudio/XFEExtension
修正XFEList编码转换协议
e71431b
代码差异
1 个文件
+2
-6
@@ -50,14 +50,10 @@ namespace XFE各类拓展.ListExtension
50
50
public static List<T> ToXFEList<T>(this string str)
51
51
{
52
52
string[] strings = str.Split(new string[] { "[+-", "-+]" }, StringSplitOptions.None);
53
for (int i = 0; i < strings.Length; i++)
54
{
55
strings[i] = strings[i].Replace("[++", "[+").Replace("++]", "+]");
56
}
57
53
List<T> list = new List<T>();
58
for (int i = 0, j = 1; i < list.Count; i++, j += 2)
54
for (int i = 0; i < strings.Length; i++)
59
55
{
60
list[i] = (T)Convert.ChangeType(strings[j], typeof(T));
56
list.Add((T)Convert.ChangeType(strings[i].Replace("[++", "[+").Replace("++]", "+]"), typeof(T)));
61
57
}
62
58
return list;
63
59
}