This question already has answers here: making a list using inner query in Linq in C# (3个答案) How to delete an element from an array in C# (10个回答) 4个月前关闭。 我正在尝试通过这种方式进行操作,但是却收到此错误“无法将类型'System.Collections.Generic.IEnumerable'隐式转换为'string []'。存在显式转换(您是否缺少类型转换?”)我如何正确地投放广告,或者有更好的方法来执行此操作?string[] text = {"abc", "def", "ghi", "?", "jkl", "?"};text = text.Where(x => x.Equals("?")); 最佳答案 因为Where()方法不返回数组,所以它返回IEnumerable 。您需要在Where()之后添加ToArray()。string[] text = {"abc", "def", "ghi", "?", "jkl", "?"};text = text.Where(x => x.Equals("?")).ToArray();关于c# - 如何从数组中删除所有出现的事件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/60609231/ 10-17 02:38