gpt4 book ai didi

c# - HtmlEncode 列表

转载 作者:行者123 更新时间:2023-11-30 21:08:50 26 4
gpt4 key购买 nike

我像这样将单元格值保存在列表中

public List<string> Cell { get; set; }

我想对这个列表的每个值进行 htmlEncode。谁能帮我解决这个问题??

最佳答案

Cell = Cell.Select(s => System.Web.HttpUtility.HtmlEncode(s)).ToList();

或者 更短:

Cell = Cell.Select(System.Web.HttpUtility.HtmlEncode).ToList();

关于c# - HtmlEncode 列表<string> 值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9362321/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com