Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does c# can do if i adding string from textbox then the string will be write in a code.

example:
Hide   Copy Code
mylist.Add(new string[] {""});

when i type "banana" from textbox and i clik save it will add or update automaticly from the code.
it become like this.
 
Hide   Copy Code
mylist.Add(new string[] {"banana"});


thank you somuch.

What I have tried:

I tried with mylist.add(new string[]{""};
Posted
Updated 23-Feb-16 20:06pm
Comments
[no name] 24-Feb-16 1:52am    
What is your exactly error. Describe it.
[no name] 24-Feb-16 2:03am    
Explain please not understandable

1 solution

Try:
C#
myList.Add(myTextBox.Text);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900