system.collections.generic.list 1 system.string c#

时间:2018-11-13 11:02:40

标签: c# list

我仍在学习c#的基础知识,我正在执行教练给我的任务,即输入一些视频游戏名称并将其显示为列表,我将在下面发布我的代码,如果有人可以告诉我为什么我会插入名称并显示“ system.collections.generic.list 1 system.string”,这会很棒。

        string game1, game2, game3;

        Console.WriteLine("Enter the First video game you own to begin your list");
        game1 = Console.ReadLine(); 

        Console.WriteLine("Enter another");
        game2 = Console.ReadLine();

        Console.WriteLine("Enter another to see the start of your list");
        game3 = Console.ReadLine();

        List<string> list = new List<string> { game1, game2, game3 };
        Console.WriteLine(list);

0 个答案:

没有答案