1
Answer

Most Viewed Video

Ramco Ramco

Ramco Ramco

2y
740
1

Hi

  I have below code but it is giving message VideoResource.ListRequest does not contain a definition for Order.

using (var yt = new YouTubeService(new BaseClientService.Initializer()
            {
                ApiKey = "Api Key",
            }))
            {
                StringBuilder htmlTable = new StringBuilder();

                var request = yt.Videos.List("snippet");
                request.Order = SearchResource.ListRequest.OrderEnum.ViewCount;
C#
Answers (1)
4
Shweta Lodha

Shweta Lodha

20 48.6k 4.2m 2y

Could you please share what all namespaces have you included? Alternatively, check this out: https://developers.google.com/youtube/v3/docs/search/list

Accepted