close
安裝IIS
開啟新專案WCF Service Application類型
服務介面宣告
實作內容
-------------------------------------------------------
客戶端 windows form
編譯WCFServiceApp,複製服務address,以便待會windows form參考用
加入service reference
Add service references
1: private void button1_Click(object sender, EventArgs e)
2: {
3: ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
4: double x = (double)numericUpDown1.Value;
5: double y = (double)numericUpDown2.Value;
6: double ret = client.Add(x, y);
7: MessageBox.Show(ret.ToString());
8: }
全站熱搜
留言列表