Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Using a dictionary with 10,000 values gives an error

$
0
0

Hi,

I am building an android app to build a puzzle from some pre-loaded puzzles in a dictionary variable (of int, string). It has over 12,000 puzzles. When the user clicks new game, a random integer is generated and the corresponding puzzle is selected from dict and loaded.

When the dict had only 10 puzzles app was working fine, but the moment I added 10,000 puzzles it shows an error the method playgame():ctor (int) is too complicated.

So I guess it has something to do with the dictionary variable? Each item has atleast 2000 characters.

Can someone tell me why this is happening and how to avoid this? I don't want to use SQlite . Can i store these puzzles in application resources and then load them?

Regards,


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>