user3146095 user3146095 - 1 year ago 74
C# Question

Classname.class.getClassLoader equivalent in Xamarin android

I am creating a map application in

I am trying to initialize an class object from the


I have the following code which I need to know the C# equivalent of:-

private Place(Parcel in){
this.mLat = in.readString();
this.mLng = in.readString();
this.mPlaceName = in.readString();
this.mVicinity = in.readString();
this.mPhotos = (Photo[])in.readParcelableArray(Photo.class.getClassLoader());

Any idea how this can be achieved??

Answer Source

Would this work?

var photos = i.ReadParcelableArray(new Photo().Class.ClassLoader).Cast<Photo>();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download