KINGx - Das inoffizielle PlayStation Forum & News Portal

Normale Version: C# Hilfe gesucht
Sie sehen gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Tach Leute,
also, ich programmiere im Moment etwas in C#, dazu habe ich eine Funktion erstellt welche prüft ob eine Textbox einen Inhalt hat, hier der code:

Code:
//prüfe ob eine box benutzt ist
    static int checkbox(TextBox a){
        bool inhalt = true;
        if(a.Text == ""){
            inhalt = false;  
        }
        return inhalt;
    }

Doch nun sagt der Compiller mir: Eine implizite Konvertierung vom Typ "bool" in "int" ist nicht möglich.

Was mache ich falsch???
Danke im vorraus
mfg
davdda

static int

nimm da mal bool
Danke, das wars Smile
Referenz-URLs