+ 1
Hi guys thankyou for the attempted answers let me make my question clearer. am creating a Windows form application in c#...
So I have a form with 3 textboxes for user input. I then create a class and code as shown below... How do I access the textboxes frm this class? class studentRegister { private int age ; private string firstName; private string lastName; public string FirstName {get ; set} public string LastName {get ;set} public string GetName() { string fullName ; FirstName = txtfstName. Text; LastName = txtLastName. Text; fullName = FirstName +LastName ; txtfullName. Text=fullName ; return fullName ; } }
1 Odpowiedź
0
Where are your text boxes defined?
How to bind in you textboxes somehow to work with them
Just like android
You can create UI elements but you need to make. Reference to them
In Java (more precisely android) it works like this
EditText edt = (EditText) findViewById(R.id.edt);
Take a look in the c# documentation you'll find your answer probably there