casting - convert Java.Lang.Object to .net type -
I want to put a spinner. Since the selected item is a java. Lung Object, I have to know that I am a Java. Lung How can I put the object in a native net net? Thanks, Alex You're binding on the spinner, but I'm assuming that it's just a list of strings? If this is the case, then one possibility is that This will not be very useful if the underlying object is a Not a string, though. You have some other options available such as you can use the spinner. Select to get items from the source of the selector spinner adapter. I like something: You can also: All of this depends on what you are trying to do and when. Xamarin is the one who uses the basics of using a spinner.
spinner.selected.Template.String ()
var source = new list & lt; String & gt; {"One", "b", "c"}; Spinner Adapter = new Arrayheader & lt; String & gt; (This, resource. Layout, item, resource.id.name, source); Var selectedString = source [spinner.SelectedItemPosition];
var selectedString = spinner.GetItemAtPosition [spinner.SelectedItemPosition]. Ostring ();
Comments
Post a Comment