It’s not an error, it’s just printing out the list. The default ToString()
implementation of List simply prints the name of the type.
I’m guessing you want it to work like in PHP, where you print arrays separated by commas? Try:
string.Join(", ", player.inventory);
More Related Contents:
- Analog of Visual Studio Solution for my application
- visual studio 2008: HELP lost data! [closed]
- How do I remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?
- How do I clone a generic list in C#?
- Remove duplicates from a List in C#
- Check whether an array is a subset of another
- Configuration System Failed to Initialize
- What is the purpose of the vshost.exe file?
- A method to count occurrences in a list
- Select distinct using linq [duplicate]
- How to add a .dll reference to a project in Visual Studio
- ICollection Vs List in Entity Framework
- how to run visual studio without plugin and all third party feature
- Why does ReSharper want to use ‘var’ for everything? [duplicate]
- How to downgrade from Visual Studio 2012 project to Visual Studio 2008
- Class List Keeps Printing Out As Class Name In Console?
- What is the best practice for “Copy Local” and with project references?
- Are 2 dimensional Lists possible in c#?
- Using msbuild to execute a File System Publish Profile
- Check if all items are the same in a List
- Parsing JSON data with C#
- How to save DLLs in a different folder when compiling in Visual Studio?
- Can the Visual Studio Debugger display strings unquoted/unescaped?
- Count property vs Count() method?
- How can I dynamically switch web service addresses in .NET without a recompile?
- Uniquely Identifying Reference Types in the Debugger
- List.Except is not working
- Go To Definition: “Cannot navigate to the symbol under the caret.”
- Active solution platform VS Project Platform VS Platform target
- How do I set the size of the visible area of a form, minus heading and borders?