Thamsanqa Ngcongwane

Thamsanqa Ngcongwane

  • NA
  • 184
  • 24.9k

How to convert Object variable type into a string

Feb 12 2020 3:17 AM
How to convert Object variable type into a string
 
My simple code
  1. void Polygon_Clicked(object sender, EventArgs e) {  
  2. try {  
  3. var tempData =(Polygon)sender;  
  4. var data = tempData.BindingContext; }  
  5. catch (Exception exp)  
  6. {  
  7. DisplayAlert("Error", $"Oops! Something went wrong. {exp.Message}""OK");  
  8. }  
  9. }
How to convert the following line of code to a list
  1. var data = tempData.BindingContext;  

Answers (3)