static void Main(string[] args) { CarRentalServiceClient myClient = new CarRentalServiceClient(); string message = myClient.GetData(13); Console.WriteLine("message = "+ message); Car car = new Car(); car.BoolValue = true; car.StringValue = "this is my car"; Car mySecondCar= myClient.GetDataUsingDataContract(car); Console.WriteLine("Car String Value = "+ mySecondCar.StringValue); myClient.Close(); }
static void Main(string[] args) { CarRentalServiceClient myClient = new CarRentalServiceClient(); string message = myClient.GetData(13); Console.WriteLine("message = " + message); Car car = new Car(); car.IsAvailable = true; car.Company = "this is my car"; Car mySecondCar = myClient.GetDataUsingDataContract(car); Console.WriteLine("Car Company = " + mySecondCar.Company); myClient.Close(); Console.ReadKey(); }