I try to convert string
to ListViewItem
:
ListViewItem str = (ListViewItem)Convert.ChangeType(az, typeof(ListViewItem));
but it doesn't work. What is wrong in this code?
I try to convert string
to ListViewItem
:
ListViewItem str = (ListViewItem)Convert.ChangeType(az, typeof(ListViewItem));
but it doesn't work. What is wrong in this code?
I am not sure I get why you are trying to change the type of a string to ListViewItem. I'm pretty sure that what you actually want to do is create a ListViewItem out of a string using regular construction:
ListViewItem item = new ListViewItem(az);