Autor Beitrag
kostonstyle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Mo 25.07.11 11:20 
Hallo miteinander
kann jemand mir bitte sagen, warum ich hier kein var Datentyp definieren kann?
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
   public class AssignNas
    {
        public void build_nas_path
        {
            var city = ( from cities in XMLFile.Descendants("city")
                       where cities.Attribute("name").Value == this.city
                       select cities );

        }
}

Als Fehlermeldung erhalte ich
ausblenden Quelltext
1:
A get or set accessor expected					

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

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 25.07.11 11:29 
Du hast die Klammern hinter der Funktionsdeklaration vergessen ;-)

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



BeitragVerfasst: Mo 25.07.11 11:56 
ich bin so dumm..........vielen dank...