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 で char をインクリメントしようとしています。例: Dim letter As Char = "a"c. そして私はそれをbにしたいなど。これどうやってするの?
ascii コードを取得し、インクリメントして、Char に戻すことができます。
Chr(Asc(letter) + 1)
これの Unicode バージョンは次のとおりです。
ChrW(AscW(letter) + 1)
編集:
Glen が指摘したように、"z"c をインクリメントしようとしている場合は注意が必要です。