RE: C# Tutorial 006: Lists & Arrays

You are viewing a single comment's thread from:

C# Tutorial 006: Lists & Arrays

in programming •  8 years ago 

Thanks for the feedback! I was personally thinking to first teach a bunch of the basics before moving on to Enumerable and Dictionary,

I'm also not really a big fan of using Dictionary after I ran into some trouble with it when developing a game on Unity.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

What was the problem you had with Dictionary?

I use them a fair deal in my code but do not tend to pass them around. I prefer to pass their lookup function around. So if I have a Dictionary<int, Person> I will pass around a Func<int, Person>

That way I do not care what the storage is :)

Unity is a different space as threaded, the C# collections are not thread safe

The XmlSerializer I had to use could not serialize Dictionaries. At first I had a workaround, but it just became too much of a struggle with several dictionaries so I had to switch To Lists or Arrays.

Btw, check out my posts. I have a series on pushing C# outside the OO norms