public void SendMessage(string messageTitle, string messageData, DatingProfile sentTo) { Messages message = new Messages(this, messageTitle, messageData); sentTo.AddToInbox(message); }
public Messages(DatingProfile sender, string messageTitle, string messageData) { this.sender = sender; this.messageTitle = messageTitle; this.messageData = messageData; isRead = false; }
static void Main(string[] args) { DatingProfile bob = new DatingProfile("Bob", "Jones", 50, "Male"); bob.WriteBio("Strong outdoors type"); DatingProfile susie = new DatingProfile("Susie", "Sue", 45, "Female"); susie.WriteBio("new to this site"); bob.SendMessage("Hello Susie", "Want to get some coffee?", susie); susie.ReadMessage(); }