private void button1_Click(object sender, EventArgs e) { using (OnlineSupportService cli = new OnlineSupportService()) { cli.ClientStart(textBox1.Text); } }
static void Main(string[] args) { OnlineSupportService obj = new OnlineSupportService(); using (ServiceHost host = new ServiceHost(obj)) { host.Open(); Console.WriteLine("Çıkış için enter'a basınız."); Console.ReadLine(); host.Close(); } }