关于如何能改变text的内容

public class fact
    {
       
private bool _Clicked;
       
public bool clicked
        {
           
get { return _Clicked; }
           
set
            {
                _Clicked
= value; } } private string _GetText;
       
public string getText
        {
           
get
            {

               
if (_Clicked)
                {
                    _GetText
= " 回答正确 " ;
                }
               
else
                {
                    _GetText
= " 回答错误 " ;
                }

               
return _GetText;
            }

        }
       
       
    }




 
C# code
    
    
    
    
public partial class Form3 : Form { BindingSource bindingSource1 = new BindingSource(); public Form3() { InitializeComponent(); } private void button1_Click( object sender, EventArgs e) { fact _fact = new fact(); _fact.clicked = true ; bindingSource1.Add(_fact); label1.DataBindings.Add( " Text " , bindingSource1, " getText " ); } }

你可能感兴趣的:(object,String,C#,Class,button)