darma teja

darma teja

  • NA
  • 496
  • 329.4k

How to write values to service reference variable

Feb 22 2017 5:17 AM
I added wsdl reference in my project. The following code is there in Refrence.cs file:
  1. public partial class MainRequest : object, System.ComponentModel.INotifyPropertyChanged  
  2. {  
  3. private test[] metadata;  
  4. private string name;  
  5. }  
  1. public partial class test : object, System.ComponentModel.INotifyPropertyChanged  
  2. {  
  3. private string key1;  
  4. private string value1;  
  5. [System.Xml.Serialization.XmlAttributeAttribute()]  
  6. public string Key {  
  7.    get {  
  8.       return this.key1;  
  9.       }  
  10.       set {  
  11.          this.key1 = value1;  
  12.          this.RaisePropertyChanged("Key");  
  13.       }  
  14.  }  
I have written code in my project like this:
  1. myReference.MainRequest objMyReq = new myReference.MainRequest();  
  2. objMyReq.name = "CompanyName";  
  3. objMyReq.metadata = //  How can I give key and values in this?

Answers (2)