ユーザーが送信ボタンをクリックしたときに、ユーザー入力を配列に挿入したいと思います。これは私が書いたものですが、うまくいかないようです。フォームは form1 と呼ばれ、独自のクラスであり、テキスト ボックスは textbox1 です。注:私はプログラミングの初心者です。
//This is my array
private string[] texts = new string[10];
public string[] Texts
{
get { return texts; }
set { texts = value; }
}
//I then attempt to insert the value of the field into the textbox
form1 enterDetails = new form1();
for(int counter = 0; counter<Texts.Length; counter++)
{
texts[counter]=enterDetails.textbox1.Text;
}