static public void Main(string[] args) { CountryList cLst = (CountryList)Activator.GetObject(typeof(CountryList), "http://localhost:8086/CountryList", WellKnownObjectMode.Singleton); cLst.AddCountry("Australia"); }
private void button2_Click(object sender, EventArgs e) { if (textBox1.Text == string.Empty) { return; } CountryList cLst = (CountryList)Activator.GetObject(typeof(CountryList), "http://" + pcName + ":8086/CountryList", WellKnownObjectMode.Singleton); cLst.AddCountry(textBox1.Text); }