How to convert Object variable type into a string
My simple code
- void Polygon_Clicked(object sender, EventArgs e) {
- try {
- var tempData =(Polygon)sender;
- var data = tempData.BindingContext; }
- catch (Exception exp)
- {
- DisplayAlert("Error", $"Oops! Something went wrong. {exp.Message}", "OK");
- }
- }
How to convert the following line of code to a list
- var data = tempData.BindingContext;