TextBox C#中的Max Char? [英] Max Char in TextBox C#?
本文介绍了TextBox C#中的Max Char?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
看看 MaxLength
TextBox
的属性 - 它存储控件可以采用的最大字符数;根据文档,它是可变的。通常默认是足够大,虽然。 (虽然我想象,因为你是问的问题,它可能不是!)
从文档,你可以看到 MaxLength
为 2147483646 。这当然是受目标机器的内存限制。
Just wondering how many char can C# Textbox multiline hold?
解决方案
Look at the MaxLength
property of the TextBox
- it stores the maximum number of characters the control can take; as per the documentation, it is changeable. Usually the default is big enough, though. (Although I imagine that since you're asing the question, it may not be!)
From the docs, you can see that the maximum value for MaxLength
is 2147483646. This is, of course, limited by the memory of the target machine.
这篇关于TextBox C#中的Max Char?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文