Reputation: 621
I am porting my WP8 app to Android using Xamarin. I use Parse as a data back end. I got an array of ints that I want to save into Parse. Parse's API has a Put() method that only accepts Java.Lang.Object. I cant figure how to convert my .Net int array to Java.Lang.Object.
Upvotes: 1
Views: 2355
Reputation: 5234
A simple helper class:
public class JavaObject<T> : Java.Lang.Object
{
public JavaObject (T obj)
{
this.Value = obj;
}
public T Value { get; private set; }
}
If that doesn't work with Parse then you could probably just create an ArrayList which is a Java object.
Upvotes: 7