コード例 #1
0
ファイル: Program.cs プロジェクト: ead2015/WcfExample
        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();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: bcsf12m522/EAD-CS12
        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();
        }