如何在 Visual Basic 中遍历字母表? [英] How can I iterate through the alphabet in Visual Basic?

查看:28
本文介绍了如何在 Visual Basic 中遍历字母表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要生成一个循环,该循环将使用 Visual Basic (2008) 遍历字母表的每个大写字母.最干净的方法是什么?

I need to generate a loop that would iterate through each capital letter of the alphabet using Visual Basic (2008). What's the cleanest way to do this?

推荐答案

For Each c In "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray()
...
Next

这篇关于如何在 Visual Basic 中遍历字母表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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