`

Retrieving the items from the Asset



private static void GetAllTheAssetsAndFiles(MediaServicesCredentials _medServCredentials)
       {
           try
           {
               string result = string.Empty;
               CloudMediaContext mediaContext;
               mediaContext = new CloudMediaContext(_medServCredentials);
               StringBuilder myBuilder = new StringBuilder();
               foreach (var item in mediaContext.Assets)
               {
                   myBuilder.AppendLine(Environment.NewLine);
                   myBuilder.AppendLine("--My Assets--");
                   myBuilder.AppendLine("Name: " + item.Name);
                   myBuilder.AppendLine("++++++++++++++++++++");
 
                   foreach (var subItem in item.AssetFiles)
                   {
                       myBuilder.AppendLine("File Name: "+subItem.Name);
                       myBuilder.AppendLine("Size: " + subItem.ContentFileSize);
                       myBuilder.AppendLine("++++++++++++++++++++++");
                   }
               }
               Console.WriteLine(myBuilder);
           }
           catch (Exception)
           {
               throw;
           }
       }
click below button to copy the code. By azure tutorial team

Related Searches to Retrieving the items from the Asset