So i was doing a tutorial on C#
for the raspberry pi. They had an image of the C# code but a bit of the image was cut off, so i dont know what goes after it. Here's the code I am using:
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);
}
}
I think the problem is on this line:
Application.SetCompatibleTextRenderingDefault();
Because this is the error I get:
test.cs(10,15): error CS1501: No overload for method SetCompatibleTextRenderingDefault' takes
0' arguments /usr/lib/mono/2.0/System.Windows.Forms.dll (Location of the symbol related to previous error) Compilation failed: 1 error(s), 0 warnings
Would someone be able to tell me what is wrong with this code. I am also new to C#. Any help is appreciated.
Have a look at the MSDN documentation here
Try
Application.SetCompatibleTextRenderingDefault(false);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.