问题遇到的现象和发生背景
C# 字节数组截取问题
用代码块功能插入代码,请勿粘贴截图
using System;
class Program
{
public static void Main(string[] args)
{
byte[] shuju = System.Text.Encoding.UTF8.GetBytes("ijsosid55fjapofjefiejfbnbbk");
shuju = shuju.Skip(9).ToArray();
Console.WriteLine(shuju);
}
}
运行结果及报错内容
Main.cs(7,39): error CS1061: Type byte[]' does not contain a definition for
Skip' and no extension method Skip' of type
byte[]' could be found. Are you missing `System.Linq' using directive?
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings