[mono-android] What´s wrong with this piece of code?
Carlo Bolz
cb at dm-edv.de
Fri Mar 11 07:36:02 EST 2011
Hello,
what´s wrong with this piece of code:
IList<IDictionary<string, object>> groupData = new
List<Dictionary<string, object>>() as IList<IDictionary<string, object>>;
IList<IList<IDictionary<string, object>>> childData = new
List<List<Dictionary<string, object>>>() as IList<IList<IDictionary<string,
object>>>;
for (int i = 0; i < 20; i++)
{
IDictionary<string, object> curGroupMap = new
Dictionary<string, object>();
curGroupMap.Add(NAME, "Group " + i.ToString());
curGroupMap.Add(ISEVEN, (i % 2 == 0) ? "This group is even"
: "This group is odd");
groupData.Add(curGroupMap); // < the app dies here
IList<IDictionary<string, object>> children = new
List<Dictionary<string, object>>() as IList<IDictionary<string, object>>;
for (int j = 0; j < 15; j++)
{
IDictionary<string, object> curChildMap = new
Dictionary<string, object>();
curChildMap.Add(NAME, "Child " + j.ToString());
curChildMap.Add(ISEVEN, (j % 2 == 0) ? "This child is
even" : "This child is odd");
children.Add(curChildMap);
}
childData.Add(children);
}
Any suggestions?
Mit freundlichem Gruß / With kind regards
Carlo Bolz
E-Mailfooter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110311/64270cc5/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 12034 bytes
Desc: not available
Url : http://lists.ximian.com/mailman/private/monodroid/attachments/20110311/64270cc5/attachment-0001.jpe
More information about the Monodroid
mailing list