C#超初心者です。
sender.Textで取得出来ると思ったら、コンパイルエラーになりました。
c#
1Button button = new Button(); 2button.Text = "hogehoge-kyun"; 3button.Click += new EventHandler(Submit);
C#
1void Submit(Object sender, EventArgs e){ 2 3 System.Console.WriteLine(sender.Text); 4}
error CS1061: 'object' does not contain a definition for 'Text' and no extension method 'Text' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
読めないけど、なんだか馬鹿にされてる気がする。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/03/02 07:01