-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessage.cs
48 lines (37 loc) · 1.19 KB
/
Message.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Feszbuk {
public class Message {
// Static (unused)
public static string[] AutoMessages { get; set; }
// Message
public int SenderID { get; private set; }
public int ReceiverID { get; private set; }
public string Content { get; private set; }
private string content;
public string AccessContent {
get {
return content;
}
set {
content = value;
}
}
// Constructor
public Message(int senderID, int receiverID, string content) {
SenderID = senderID;
ReceiverID = receiverID;
Content = content;
}
// Methods
public override string ToString() {
return String.Format("\n**message information: **\nSender ID: {0}\nReceiver ID: {1}\nContent: {2}", SenderID, ReceiverID, Content);
}
public string Export(char separator) {
return String.Join(separator.ToString(), SenderID, ReceiverID, Content);
}
}
}