i m new to c#
i was designing a calculator
i need to accept a string of integers from textbox
save it in a variable
clear the textbox
and then accept a new string of integers
plz kindly help
sarganaa
0
Newbie Poster
Recommended Answers
Jump to Postusing System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb { public partial class frmText : Form { private List<string> _values; public frmText() { InitializeComponent(); _values = new List<string>(); } private void button1_Click(object sender, EventArgs e) { _values.Add(textBox1.Text); textBox1.Clear(); …
Jump to Postsarganaa,
STOP SENDING ME PRIVATE MESSAGES WITH THE SAME TEXT AS YOUR POSTS. Daniweb sends an email when you update the thread, I don't need a private message + new private message alert email + thread update email every time you post on a thread.
I posted the …
Jump to PostThis stores a text box to a global string s, then clears the textbox.
(Assuming you have a button named button1 and a textbox named textBox1)string inputstring; private void button1_Click(object sender, EventArgs e) { inputstring = textBox1.Text; textBox1.Clear(); }
If you want the button to work …
All 12 Replies
sknake
1,622
Senior Poster
Featured Poster
themaster
-7
Newbie Poster
sknake
commented:
Restart an application to clear a variable? Please
+0
sarganaa
0
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
sarganaa
0
Newbie Poster
lagspike
6
Light Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
sarganaa
0
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
themaster
-7
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
sarganaa
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.