This code was working in v1.2, but I get "System.NotSupportedException: Don't
know how to convert type TicketLine to an Android.Runtime.IJavaObject" in
4.0:
My class:
class TicketLine
{
public int TicketNo {get; set;}
public int LineNo { get; set; }
public string ItemNo { get; set; }
public int Quantity { get; set; }
public string Description { get; set; }
public string UserDescription { get; set; }
public string MAC { get; set; }
public string SerialNumber { get; set; }
public string DeviceType { get; set; }
public override string ToString()
{
if (string.IsNullOrEmpty(SerialNumber) &&
string.IsNullOrEmpty(MAC))
return "(Qty) " + Quantity.ToString() + " - " + ItemNo + " -
" + Description;
else
return "Registered: (Qty) " + Quantity.ToString() + " - " +
ItemNo + " - " + UserDescription;
}
}
}
This code fails in 4.0:
ArrayAdapter<TicketLine> adapter = new
ArrayAdapter<TicketLine>(this, Android.Resource.Layout.SimpleListItem1,
listViewArray);
where listViewArray is:
listViewArray = new TicketLine[i];
Please advise.
Thank,
Mike
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Error-with-MonoDroid-4-tp5061997p5061997.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid