我現在在寫一個程式
大概功能是
textBox1 跟 textBox2 還有 textBox3
程式開始時
會隨機抓一個字串去textBox1 但是會用*顯示
比如說抓到的是sagittarius textBox1會顯示成s**********
這時候我在textBox2輸入sagittarius的話 就會跑出對話框框說"你答對了"
要是我是輸入sagittarfffff 的話 會跑出"猜錯了!在猜一次吧"
同時間textBox1的s********** 會在隨機讓除了開的的s之外其中的*變成單字的英文
猜兩次失敗就會有三個是英文顯示 其他是*以此類推
當我猜五次了還沒猜對 就會出現對話框框說"你好笨喔!正確答案是"
然後textBox3是用來顯示textBox1的字串長度
以下是我做到卡住的地方
我真的沒辦法了 幫幫忙會的人教教我

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 Form1_Load(object sender, EventArgs e)
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
string[] a = { "aries", "tarurs", "gemini", "cancer", "leo", "virgo", "libra", "scorpio", "sagittarius", "capriccrn", "aquarius", "pisces" };
string t;
int b;
Random r = new Random(); //將英文重新排序
for (int i = 0; i <= 11; i++)
{
//隨機產生以上十二個單字
b = r.Next(12);
t = a[i];
a[i] = a[b];
a[b] = t;
textBox1.Text = a[b];
}
}
private void button2_Click(object sender, EventArgs e)
{
string c;
int a = 0, b = 0;
c = textBox2.Text;
for (int i = 0; i <= 11; i++)
{
for (int j = 0; j <= 11; i++)
{
if (textBox1.Text == textBox2.Text)
{
}
}
if (textBox1.Text[i] == textBox2.Text[i])
{
}
}
}
private void label1_Click(object sender, EventArgs e)
{
}
}
}