Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我正在尝试在 vb.net 中增加一个字符,例如:Dim letter As Char = "a"c。我想把它变成b,等等。我怎样才能做到这一点?
您可以获取 ascii 代码、递增并转换回 Char:
Chr(Asc(letter) + 1)
它的 Unicode 版本是:
ChrW(AscW(letter) + 1)
编辑:
正如格伦指出的那样,如果您尝试增加“z”c,则需要小心