N
N
Ness2020-02-01 11:13:30
API
Ness, 2020-02-01 11:13:30

VkNet c# how to implement getting multiple images from the 1st post?

var posts = _api.Wall.Get(new WallGetParams { Domain = "some domain", Count = 1 });

            foreach (var item in posts.WallPosts)
            {
                for (int i = 0; i < item.Attachments.Count; i++)
                {
                    Photo items = (Photo)item.Attachments[i].Instance;
                    List<Photo> post = new List<Photo>();
                    post.AddRange(items); // тут ошибку выбивает
                }
             }


post.Add(items) - works, but I need not 1 image, but everything that is in the post, tell me who can implement it

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question