首页 > 其他 > 详细

C# 如何读取一行中的所有变量

时间:2014-01-16 00:03:19      阅读:404      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            char[] delimiterChars = {  , ,, ., :, \t };
            string text = this.textBox1.Text;
            string[] words = text.Split(delimiterChars);
            foreach (String ss in words)
            {
                this.listBox1.Items.Add(ss);
            }
        }
    }
}
bubuko.com,布布扣

bubuko.com,布布扣

C# 如何读取一行中的所有变量

原文:http://www.cnblogs.com/China3S/p/3516506.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!