dugubaitian 发表于 2014-6-30 09:22
你的问题有点绕。。 string[] strs = input.Split('@'); 我看你的程序就是要使用string.split对字符串 ...
指尖舞者 发表于 2014-6-30 09:27
是的 我知道它如何分割的 我意思 加入我们自己的用户名里面包含了@字符 在用这个方法来分割 应该就有BUG ...
天佑の清清 发表于 2014-6-30 11:20
从Email中提取出用户名和域名:。
class Program
{
专属第三 发表于 2014-6-30 11:07
Email地址只能由字母数字下划线组成,就像你的if判断,如果分割的不是两个,那就是输入的错误 ...
The_Enternal 发表于 2014-6-30 19:03
using System;
using System.Collections.Generic;
using System.Text;
1.jpg (6.21 KB, 下载次数: 59)
追梦无悔 发表于 2014-7-1 10:08
你可以使用正则表达式进行校验啊
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |