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("Mark", "Slone", 40, "Male"); bob.WriteBio("New to this online dating."); DatingProfile susie = new DatingProfile("Lexie", "Grey", 25, "Female"); susie.WriteBio("Love to read and write."); bob.SendMessage("Hello Lexie", "When is the new book coming out?", susie); susie.ReadMessage(); }
public void SendMessage(string messageTitle, string messageData, DatingProfile sentTo) { Messages message = new Messages(this, messageTitle, messageData); sentTo.AddToInbox(message); }