Esempio n. 1
0
 public CompositeType GetDataUsingDataContract(CompositeType composite)
 {
     if (composite == null)
     {
         throw new ArgumentNullException("composite");
     }
     if (composite.BoolValue)
     {
         composite.StringValue += "Suffix";
     }
     return composite;
 }
Esempio n. 2
0
 static void Main(string[] args)
 {
     Service1Client client = new Service1Client();
     Console.WriteLine(client.GetData(10));
     Console.ReadLine();
     CompositeType ct = new CompositeType();
     ct.BoolValue = true;
     ct.StringValue = "Karen ";
     ct=client.GetDataUsingDataContract(ct);
     Console.WriteLine(ct.StringValue);
     Console.ReadLine();
     client.Close();
 }