开发者

make a class convertible to another class vb.net

Is it possible to make my custom item class so that I can put it straight into a 开发者_运维技巧listviewitem? What I mean is a listview and I want to be able to do Listview.items(0) = Item

Or is this not possible?


You can make your class derive from ListViewItem

Public Class MyItem
    Inherits ListViewItem

    ....

End Class

This allows you to use MyItem in all places where a ListViewItem is accepted.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜