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 jerry = new DatingProfile("Jerry", "Matthews", 62, "Male"); jerry.WriteBio("Big game"); DatingProfile sara = new DatingProfile("Sara", "Burke", 36, "Female"); sara.WriteBio("Dog lover"); jerry.SendMessage("Hello Sara", "How about that weather?", sara); sara.ReadMessage(); }
public void SendMessage(string messageTitle, string messageData, DatingProfile sentTo) { Messages message = new Messages(this, messageTitle, messageData); sentTo.AddToInbox(message); }