Autor Beitrag
Hajoseb
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 42



BeitragVerfasst: Do 14.06.07 20:54 
Hallo, Experten.

Aufgrund vieler netter Hinweise, steige ich jetzt gerade auf C# um und habe sofort ein Problem ...

Sieht eigentlich einfach aus (selbst für mich) *g*
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace WindowsApplication1
{
    static class FormWortlisten
    {
        /// <summary>
        /// Der Haupteinstiegspunkt für die Anwendung.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FormWortlisten());
        }
    }
}


aber ich bekomme diesen Fehler (und bisher nur diesen):

Zitat:
Fehler 1 Das Programm "C:\Dokumente und Einstellungen\xxx\Eigene Dateien\Visual Studio 2005\Projects\Wortlisten\Wortlisten\obj\Debug\Wortlisten.exe" enthält keine als Einstiegspunkt geeignete statische Main-Methode


Was ist mein Denkfehler?
Insbesondere hat Microsoft Visual c# 2005 diese Datei selber erstellt ...

Mfg Hajoseb
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Do 14.06.07 21:18 
Ich würde tippen, dass die Main-Methode public sein muss.

//Edit: Oder die Klasse? :gruebel:

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Hajoseb Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 42



BeitragVerfasst: Do 14.06.07 21:28 
Ich geb dir recht, wenn selbst Microdoof nicht mal weis was es macht ... :roll:

Hab einfach noch mal neu angefangen und starte nach jedem Schritt. Wenn ein Fehler kommt geh ich einen Schritt zurück ... :roll:

Mfg Hajoseb
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Fr 15.06.07 09:34 
Schau mal in den Projektoptionen, dort kannst Du einen Einstiegspunkt beim Start festlegen. Wahrscheinlich steht Deine Main-Methode dort nicht drin.
Hajoseb Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 42



BeitragVerfasst: Fr 15.06.07 10:53 
Danke.

Werde das "alte" nacher nochmal laden und nachsehen.

Hab gesetern (wie die Noob so sind) nochmal frisch angefangen und bis jetzt geht es noch ganz gut :)

Mfg Hajoseb