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

Bug in generic list order?

$
0
0

Hello.

I have a problem with the order in List. With following code:

    public void ShowMessage(string Title, string Message)
    {
        AlertDialog.Builder Alert = new AlertDialog.Builder(this);
        Alert.SetTitle(Title);
        Alert.SetMessage(Message);
        Alert.SetCancelable(false);
        Alert.SetPositiveButton("OK", delegate { });
        Alert.Show();
    }

... for (int i = 0; i < 10; i++) TestList.Add(i); foreach (int i in TestList) ShowMessage("Test", i.ToString()); ...

I get this result:

9 8 7 6 5 4 3 2 1 0

But it must be:

0 1 2 3 4 5 6 7 8 9


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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