I'm looking for something similar in Xamarin
to iOS
-description
method which is just string representation of object (called when u type po
object in XCode
console)
F.e I'm getting a Array
or Dictionary
and I need to display it in a label
in iOS
I'd easilly do:
label.text = object.description;
and it would work for dictionary
and arrays
:
<__NSArrayI 0x7f8a83ef4b10>(
{
description = "set_loyalty";
event = "";
mutation = 100;
previous = 0;
timestamp = "2016-04-08 09:45:15";
},
{
description = "set_loyalty";
event = "";
mutation = 100;
previous = 100;
timestamp = "2016-04-08 09:45:16";
},
but in Xamarin I weren't able to find easy way to achieve the same.
I've tried:
- object.toString();
- String.Format("{0}", object);
- object.Description;
None of it works like I want (I don't expect it to work :) like I want )
Is there a simple way to achieve this?