Practicing Dictionaries
Fill in the blanks to declaring a new dictionary called book
, also for adding and outputting data. Use implicit declaration for creating the dictionary.
index.cs
123456789101112131415161718192021222324using System; using System.Collections.Generic; namespace ConsoleApp { class Program { static void Main(string[] args) { // Declaring a new empty dictionary ___ ___ = new Dictionary<string, string>(); // Adding data to the dictionary ___("name", "The Hobbit"); ___("author", "J. R. R. Tolkien"); ___("publication date", "21 September 1937"); // Outputting data Console.WriteLine("Book Name: " + ___); Console.WriteLine("Author: " + ___); Console.WriteLine("Publication Date: " + ___); } } }
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 5
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 2.04
Practicing Dictionaries
Desliza para mostrar el menú
Fill in the blanks to declaring a new dictionary called book
, also for adding and outputting data. Use implicit declaration for creating the dictionary.
index.cs
123456789101112131415161718192021222324using System; using System.Collections.Generic; namespace ConsoleApp { class Program { static void Main(string[] args) { // Declaring a new empty dictionary ___ ___ = new Dictionary<string, string>(); // Adding data to the dictionary ___("name", "The Hobbit"); ___("author", "J. R. R. Tolkien"); ___("publication date", "21 September 1937"); // Outputting data Console.WriteLine("Book Name: " + ___); Console.WriteLine("Author: " + ___); Console.WriteLine("Publication Date: " + ___); } } }
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 5