public Messages(DatingProfile sender, string messageTitle, string messageData) { this.sender = sender; this.messageTitle = messageTitle; this.messageData = messageData; this.isRead = false; }
static void Main(string[] args) { DatingProfile dave = new DatingProfile("Dave", "Jones", 36, "Male"); dave.WriteBio("Husky, strong, and a perfect gentleman."); DatingProfile abigal = new DatingProfile("Abigal", "Jenkins", 29, "Female"); abigal.WriteBio("Shy and hoping to find a nice guy."); dave.SendMessage("Hi Abigal", "Would you like to go out to dinner with me?", abigal); abigal.ReadMessage(); }
public void SendMessage(string messageTitle, string messageData, DatingProfile toProfile) { Messages message = new Messages(this, messageTitle, messageData); toProfile.AddToInbox(message); }