<legend id='pmURS'><style id='pmURS'><dir id='pmURS'><q id='pmURS'></q></dir></style></legend>

        <bdo id='pmURS'></bdo><ul id='pmURS'></ul>
    1. <i id='pmURS'><tr id='pmURS'><dt id='pmURS'><q id='pmURS'><span id='pmURS'><b id='pmURS'><form id='pmURS'><ins id='pmURS'></ins><ul id='pmURS'></ul><sub id='pmURS'></sub></form><legend id='pmURS'></legend><bdo id='pmURS'><pre id='pmURS'><center id='pmURS'></center></pre></bdo></b><th id='pmURS'></th></span></q></dt></tr></i><div id='pmURS'><tfoot id='pmURS'></tfoot><dl id='pmURS'><fieldset id='pmURS'></fieldset></dl></div>

      <small id='pmURS'></small><noframes id='pmURS'>

        <tfoot id='pmURS'></tfoot>
      1. char 的增量

        时间:2023-05-20

        <i id='b9FuR'><tr id='b9FuR'><dt id='b9FuR'><q id='b9FuR'><span id='b9FuR'><b id='b9FuR'><form id='b9FuR'><ins id='b9FuR'></ins><ul id='b9FuR'></ul><sub id='b9FuR'></sub></form><legend id='b9FuR'></legend><bdo id='b9FuR'><pre id='b9FuR'><center id='b9FuR'></center></pre></bdo></b><th id='b9FuR'></th></span></q></dt></tr></i><div id='b9FuR'><tfoot id='b9FuR'></tfoot><dl id='b9FuR'><fieldset id='b9FuR'></fieldset></dl></div>

        <small id='b9FuR'></small><noframes id='b9FuR'>

          <bdo id='b9FuR'></bdo><ul id='b9FuR'></ul>
            1. <legend id='b9FuR'><style id='b9FuR'><dir id='b9FuR'><q id='b9FuR'></q></dir></style></legend>

                  <tbody id='b9FuR'></tbody>
                <tfoot id='b9FuR'></tfoot>

                  本文介绍了char 的增量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我发现了一些问题,询问如何让 char 'B' 返回 'C' 然后 'D' 等.答案非常复杂,而且大多只是矫枉过正.

                  I found some question asking how to let char 'B' to return 'C' and then 'D' etc. The answers were quite complex and mostly just overkill.

                  为什么不简单地使用这个:

                  Why not to use simply this:

                  char X='A';
                  X++
                  

                  从 A 到 Z,接下来呢?

                  It goes from A to Z and what next?

                  推荐答案

                  如果您对给出的结果感到满意,那很好.

                  If you're happy with the results that gives, then that's fine.

                  通常当我看到这样的问题时,他们希望从Z"换行到AA"或类似的东西——比如 Excel 列.显然只是增加一个 char 不会这样做 - 它会转到 '['.

                  Usually when I've seen questions like that, they want to wrap from "Z" to "AA" or something like that that though - like Excel columns. Clearly just incrementing a char won't do that - it would go to '['.

                  或者,即使在单个字符内,有效值的范围也可能是不连续的——最明显的例子是十六进制.如果你增加 '9' 你会得到 ':' 而不是你可能想要的 'a' 或 'A'.所需的顺序很少是Unicode 给你什么".

                  Alternatively, even within a single character, the range of valid values may be non-contiguous - the obvious example being hex. If you increment '9' you get ':' instead of the 'a' or 'A' which you probably wanted. The desired order is rarely "whatever Unicode gives you".

                  这篇关于char 的增量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:char.GetNumericValue 是怎么回事? 下一篇:在 c# 为什么 (char)(1) + (char)(2) 导致 int 3

                  相关文章

                  1. <tfoot id='CnxFO'></tfoot>

                    <small id='CnxFO'></small><noframes id='CnxFO'>

                    <i id='CnxFO'><tr id='CnxFO'><dt id='CnxFO'><q id='CnxFO'><span id='CnxFO'><b id='CnxFO'><form id='CnxFO'><ins id='CnxFO'></ins><ul id='CnxFO'></ul><sub id='CnxFO'></sub></form><legend id='CnxFO'></legend><bdo id='CnxFO'><pre id='CnxFO'><center id='CnxFO'></center></pre></bdo></b><th id='CnxFO'></th></span></q></dt></tr></i><div id='CnxFO'><tfoot id='CnxFO'></tfoot><dl id='CnxFO'><fieldset id='CnxFO'></fieldset></dl></div>
                    <legend id='CnxFO'><style id='CnxFO'><dir id='CnxFO'><q id='CnxFO'></q></dir></style></legend>
                    • <bdo id='CnxFO'></bdo><ul id='CnxFO'></ul>