wcf代码有点问题,求高手
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
using ch26Ex01Client.ServiceReference1;
namespace ch26Ex01Client.ServiceReference1
{
class Program
{
static void Main(string[] args)
{
string numericInput = null ;
int intParam;
do
{
Console.WriteLine(
"Enter an integer and press enter to call the WCF service.");
numericInput = Console.ReadLine();
}
while (!int.TryParse(numericInput,out intParam));
ServiceClient client=new ServiceClient();
Console.WriteLine(client.GetData(intParam));
Console.WriteLine("press an key to exit.");
Console.ReadKey();
}
}
}
这个代码是按照C#经典入门那本书敲得,但总是有错误,求高手