43679是个魔术数字吗? [英] Is 43679 a magic number?

查看:349
本文介绍了43679是个魔术数字吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我正在调查这个问题:在DataGridView C#中存储长值.经过一些测试,我发现DataGridViewCell不会显示任何长度大于 43679 个字符的文本,即使该值实际上存储在单元格中,并且您可以通过编程方式访问它.

实际上,这也已报告为SQL Server Management Studio的错误:解决方案

如果将43679转换为十六进制,则为0xAAA0.或以相反的形式0xAAA0 = 0xFFFF - 0x555F.

0x555F是中文Unicode符号'open;的代码;开始".可能是中文信息或某种中文魔术)

Recently I was investigating this question: Storing long values in DataGridView C#. After some tests I found out that the DataGridViewCell will not display any text with a length larger than 43679 characters, even if the value is actually stored in the cell and you can access it programmatically.

Actually, this has also been reported as a bug for SQL Server Management Studio: SSMS - Can not paste more than 43679 characters from a column in Grid Mode.

I guess that the limit is intended to prevent any overload on the UI rendering. But my questions are:

  1. Why this exact value is being used?
  2. Is there any documentation for this limit?

解决方案

If convert 43679 to hex then it's 0xAAA0. Or in inverse form 0xAAA0 = 0xFFFF - 0x555F.

0x555F is code of Chinese Unicode symbol 'open; begin'. May be it is a Chinese message or some kind of Chinese magic)

这篇关于43679是个魔术数字吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆