c# - listview FindItemWithText empty or not? -
i'm searching listview item specified string. if string found select listviewitem.
listviewitem index = listview1.finditemwithtext(txtsearch.text);
pretty simple :) i'm having hard time figure, want know index variable populated, thinking check length property cannot find, once again how know index variable empty or not?
thanks
finditemwithtext
method returns null
if list empty or there no matching item. so, check result null:
listviewitem item = listview1.finditemwithtext(txtsearch.text); if (item != null) { // have match }
Comments
Post a Comment