App_Code.Controls.RecentComments.BindComments C# (CSharp) Method

BindComments() private static method

Binds the comments.
private static BindComments ( ) : List
return List
        private static List<Comment> BindComments()
        {
            var comments = (from post in Post.ApplicablePosts
                            where post.IsVisible
                            from comment in post.Comments
                            where comment.IsApproved
                            select comment).ToList();

            comments.Sort();
            comments.Reverse();

            List<Comment> returnComments = new List<Comment>();

            foreach (var comment in
                comments.Where(comment => comment.Email != "pingback" && comment.Email != "trackback").Take(BlogSettings.Instance.NumberOfRecentComments))
            {
                returnComments.Add(comment);
            }

            return returnComments;
        }