C#GUI代码错误

C#GUI代码错误,c#,user-interface,mono,C#,User Interface,Mono,所以我在做一个 为了树莓皮。他们有一个C代码的图像,但是有一点图像被截去了,所以我不知道它后面是什么。 以下是我正在使用的代码: using System; using System.Windows.Forms; using System.Drawing; class Program { public static void Main(string[] args) { Application.EnableVisualStyles(); Applica

所以我在做一个

为了树莓皮。他们有一个C代码的图像,但是有一点图像被截去了,所以我不知道它后面是什么。 以下是我正在使用的代码:

using System;
using System.Windows.Forms;
using System.Drawing;

class Program {

    public static void Main(string[] args) {

        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault();
        var f=new Form();
        f.SetBounds(0,0,100,100);
        Application.Run(f);
    }
}
我认为问题出在这一行:

Application.SetCompatibleTextRenderingDefault();
因为这是我得到的错误:

test.cs(10,15):错误CS1501:方法
SetCompatibleTextRenderingDefault'没有重载,该方法使用的参数为
0 /usr/lib/mono/2.0/System.Windows.Forms.dll(与先前错误相关的符号位置) 编译失败:1个错误,0个警告

有人能告诉我这个代码有什么问题吗。我也是C#的新手。
非常感谢您的帮助。

请查看MSDN文档

试一试

Application.SetCompatibleTextRenderingDefault(false);