开发者

C# listview maximum number of rows

what is the maximum number of rows can listv开发者_StackOverflow中文版iew have?


The maximum number of rows a ListView can have will be constrained by available memory. However, the maximum number of rows you should place in a ListView should be constrained by common sense. A UI will simply be unusable with a ListView that comes anywhere near the actual limit imposed by the computer.


In a way, "limitless" for most peoples needs but remember;

"With great power, comes great responsibility".

Although you may be able to go crazy with the amount of rows it doesn't mean you should. Rethink your design to avoid having to ask these kinds of questions, think about the end user as they will be using the application.


If you use its virtual capability then I think you're limited by the maximum of int. But for practical purposes, virtual or not, you'll be hitting a memory limit before you hit a limit on the number of rows.


The answers above are correct, constrained by available memory for the collection, but seeing as the count property of the items is an integer, I'd reckon you could have atleast 2,147,483,647 items :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜