Invat C# si am cautat niste tutoriale pe Google. In consola, totul bine si frumos. La GUI, primesc 3 erori, desi copiez exemplul cel mai simplu din tutorial. Asta ar fi programul:
using System.Windows.Forms;
class test : Form //class test inherit from the class Form
{
public static void Main()
{
test HelloForm=new test();
HelloForm.Text="How do you do?";//specify title of the form
Application.Run(HelloForm);//display form
}
}
Iar astea ar fi erorile:
Program 'c:Documents and SettingsJujuMy DocumentsSharpDevelop ProjectsWindowsHelloMumobjDebugWindowsHelloMum.exe' has more than one entry point defined: 'test.Main()' (CS0017) - C:Documents and SettingsJujuMy DocumentsSharpDevelop ProjectsWindowsHelloMumMainForm.cs:4,23
'WindowsHelloMum.MainForm.Dispose(bool)': no suitable method found to override (CS0115) - C:Documents and SettingsJujuMy DocumentsSharpDevelop ProjectsWindowsHelloMumMainForm.Designer.cs:22,27
Program 'c:Documents and SettingsJujuMy DocumentsSharpDevelop ProjectsWindowsHelloMumobjDebugWindowsHelloMum.exe' has more than one entry point defined: 'WindowsHelloMum.Program.Main(string[])' (CS0017) - C:Documents and SettingsJujuMy DocumentsSharpDevelop ProjectsWindowsHelloMumProgram.cs:24,23
Folosesc SharpDevelop. Am selectat de la inceput sa fie Windows Application, altceva nu stiu. Care ar putea fi problema?
LE: Si care-i diferenta dintre a scrie un text direct intr-un form si de a-l scrie facand un label?