Пример #1
0
        private static void GreetSvc()
        {
            SvcRef.Service1Client client = new SvcRef.Service1Client();
            var retVal = client.GetData(10);
            var greet  = client.Greet("Ajay Singala");

            Console.WriteLine($"{retVal} and {greet}");
        }
Пример #2
0
        private static void GetCompositeData()
        {
            SvcRef.Service1Client client    = new SvcRef.Service1Client();
            SvcRef.CompositeType  composite = new SvcRef.CompositeType();
            composite.BoolValue   = true;
            composite.StringValue = "John Smith";

            var retVal = client.GetDataUsingDataContract(composite);

            Console.WriteLine($"{retVal.StringValue}");
        }