编辑代码

using System;
public class Snake
{
        int width =20;
        int hid = 50;
        Console.BufferHeight = hid;
        Console.BufferWidh = width;

        public void Draw()
        {
        for(int a = 0;a<width;a++)
        {
            Console.WriteLine("-")
        }
        }
}
public class HelloWorld
{
    public static void Main()
    {
        Snake snake = new Snake();
        Snake.Draw();
       //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
        Console.WriteLine("HELLO world!     - cs.jsrun.net ");
    }
}