コード例 #1
0
 public Messages(DatingProfile sender, string messageTitle, string messageData)
 {
     this.sender       = sender;
     this.messageTitle = messageTitle;
     this.messageData  = messageData;
     isRead            = false;
 }
コード例 #2
0
        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.ReadMessages();
        }
コード例 #3
0
        public void SendMessage(string messageTitle, string messageData, DatingProfile sentTo)
        {
            Messages message = new Messages(this, messageTitle, messageData);

            sentTo.AddToInbox(message);
        }