public void AddPost() { Post[] post = new Post[++PostCount]; if (Posts != null) { Posts.CopyTo(post, 0); } post[post.Length - 1] = ReadLinePost(); Posts = post; }
public void AddPost(ref Post post) { Post[] temp = new Post[++PostCount]; if (Posts != null) { Posts.CopyTo(temp, 0); } temp[temp.Length - 1] = post; Posts = temp; }
public void AddPost() { Post[] posts = new Post[++PostCount]; if (Posts != null) { Posts.CopyTo(posts, 0); } posts[posts.Length - 1] = NewPost(); Posts = posts; }