Autor Beitrag
pascalsv
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 133

Win XP Prof. SP2 / Windows 7
Visual Studio 2008 / Silverlight 3 / Silverlight 4 Beta
BeitragVerfasst: Di 02.09.08 17:13 
Hallo zusammen,

ich habe einen WebService eingebunden und damit wird von VS2008 automatisch die Reference.cs generiert. Diese wirft nun den Fehler "An object reference is required for the non-static field, method, or property 'AccessByDWebService.StefansWebService.Bapiret2.System.get'" bei jeder Methode "[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=X)]", wie z.B. hier:
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
  
    public partial class Bapiret2 : object, System.ComponentModel.INotifyPropertyChanged {
        
        private string typeField;
...        
        /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)]
        public string Number {
            get {
                return this.numberField;
            }
            set {
                this.numberField = value;
                this.RaisePropertyChanged("Number");
            }
        }


Hat jemand eine Idee, was ich hier ändern muss?

Danke,

Pascal
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: Di 02.09.08 18:01 
Ganz schlechte Idee, deine Property "System" zu nennen ;) .

_________________
>λ=