开发者

C# listview maximum number of rows

开发者 https://www.devze.com 2022-12-19 06:39 出处:网络
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 row

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

精彩评论

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