c#简单的船体程序 输入字符到textbox中 请过处理显示到label中
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;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string strname = textBox1.Text.ToString();
label1.Text = "你好" + strname + ":\n\n 这是visual c#!";
label1.Visible=true;
}
}
}
程序运行效果: