if I have textBox with a couple of lines, how would it be possible to read line by line in a List<String> ?
List<String^>^ ReadEachLine = gcnew List<String^>();
//How to ->Add each line from TextBox1 ?
if I have textBox with a couple of lines, how would it be possible to read line by line in a List<String> ?
List<String^>^ ReadEachLine = gcnew List<String^>();
//How to ->Add each line from TextBox1 ?
@Darth : How to ->Add each line from TextBox1?
Two ways:
First,
List<String^>^ list=gcnew List<String^>();
for each(String^ str in textBox1->Lines){
list->Add(str);
}
Second,
List<String^>^ list=gcnew List<String^>(textBox1->Lines);
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.