program.cs

来自「C#高级编程第6版随书源代码 值得下载」· CS 代码 · 共 35 行

CS
35
字号
using System;
using System.ServiceModel;
using WCFClientApp.OrderService;

namespace WCFClientApp
{
    class Program
    {
        static void Main()
        {
            Order order = new Order();
            order.customerId = "PICCO";
            order.orderDate = DateTime.Today;
            order.shipAddress = "Georg Pipps";
            order.shipCity = "Salzburg";
            order.shipCountry = "Austria";
            OrderLine line1 = new OrderLine();
            line1.productId = 16;
            line1.unitPrice = 17.45F;
            line1.quantity = 2;
            OrderLine line2 = new OrderLine();
            line2.productId = 67;
            line2.unitPrice = 14;
            line2.quantity = 1;
            OrderLine[] orderLines = { line1, line2 };
            order.orderLines = orderLines;
            
            OrderControlClient occ = new OrderControlClient();
            occ.NewOrder(order);
            
            
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?