[DataContract] public class DataMessage { [DataMember] public string Name { get; set; } } [ServiceContract] public interface IService1 { [OperationContract] string GetMessage(string name); [OperationContract] void BroadcastToClient(DataMessage eventData); }
ServiceReference1.Service1Client client; DataMessage message = new DataMessage(); message.Name = textBox1.Text; client.BroadcastToClient(message);
public void BroadcastToClient(DataMessage eventData) { MessageBox.Show(eventData.Name); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)