生成的字母数组在C#中的字母 [英] Generating an array of letters in the alphabet in C#

查看:432
本文介绍了生成的字母数组在C#中的字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种简单的方法来生成包含在C#中的英文字母数组?它不是太难做手工,但我不知道是否有一个内置的方式做到这一点。

Is there an easy way to generate an array containing the letters of the alphabet in C#? It's not too hard to do it by hand, but I was wondering if there was a built in way to do this.

推荐答案

我不认为有一个内置的方式,但我认为最简单的是

I don't think there is a built in way, but I think the easiest would be

  char[] alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray();

这篇关于生成的字母数组在C#中的字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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