static void Main(string[] args) { Post p1 = Post.Random(); Post p2 = new Post(p1); Console.WriteLine(p1); Console.WriteLine(p2); Console.WriteLine("P1 == P2 " + (p1 == p2)); Console.WriteLine("P1 equals P2 " + p1.Equals(p2)); Console.WriteLine("Press any key to continue..."); Console.ReadKey(); }
public Post(Post p) : this(p.Date, p.Text, p.Value) { }