... using Microsoft.ProjectOxford.Vision.Contract; using System; using System.Linq; ... namespace VisionRacing.AnalyzeKartingImage { class Program { ... private static void ShowAnalysisResult(AnalysisResult result) { Console.ForegroundColor = ConsoleColor.White; Log("Image analysis result"); Console.WriteLine(); if (result.Description != null) { Console.ForegroundColor = ConsoleColor.Green; Log("1. Image description"); Console.ForegroundColor = ConsoleColor.Gray; if (result.Description.Captions.Any()) { foreach (var caption in result.Description.Captions) { Log($" Caption: {caption.Text} (Confidence {caption.Confidence.ToString("P0")})"); } } else { Log(" No image caption"); } Console.WriteLine(); if (result.Description.Tags.Any()) { Log($" Tags: {string.Join(", ", result.Description.Tags)}"); Console.WriteLine(); } } if (result.Tags != null && result.Tags.Any()) { Console.ForegroundColor = ConsoleColor.Green; Log("2. Image tags"); foreach (var tag in result.Tags) { Console.ForegroundColor = ConsoleColor.Gray; Log($" Name: {tag.Name} (Confidence {tag.Confidence.ToString("P0")}{(string.IsNullOrEmpty(tag.Hint) ? string.Empty : $" | Hint: {tag.Hint}")})"); } Console.WriteLine(); } } private static void Log(string message) { Console.WriteLine(message); } } }