how to convert string to listviewitem?
I try to convert string
to ListViewItem
:
ListViewItem str = (开发者_C百科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);
精彩评论