예제 #1
0
 public Messages(DatingProfile sender, string messageTitle, string messageData)
 {
     this.sender       = sender;
     this.messageTitle = messageTitle;
     this.messageData  = messageData;
     this.isRead       = false;
 }
예제 #2
0
        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();
        }
예제 #3
0
        public void SendMessage(string messageTitle, string messageData, DatingProfile toProfile)
        {
            Messages message = new Messages(this, messageTitle, messageData);

            toProfile.AddToInbox(message);
        }