Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to check if picker.SelectedItem contains a string in a List?

$
0
0

I have a List of countries, and I want to check if the selected item in a picker is in the list of countries.

e.g.

List<string> countries = new List<string> { "Austria", "Australia", "Bahrain" }

and I want to use something like (does not exist):

if(picker.SelectedItem.Contains(countries)) { //do something }


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>