شمردن تعداد کلمات ورودی
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace s159_t1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string n = (textBox1.Text).Trim();
string[] s1 = n.Split(' ', '.', ',', '?');
for (int i = 0; i <= (s1.Length); i++)
label1.Text=(i.ToString());
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
نظرات شما عزیزان: