Hello,

I wonder how it is possible to read a multilined textBox line by line into a List<String^>.

I dont get the below code to compile so I might be missing something here ?

array<String^>^ mylines = textBox1->Text->Split(System::Environment::NewLine); 

List<String^>^ getLines = gcnew List<String^>(); 
String^ getLine = ""; 
for (int i = 0; i < mylines->Length; i++) 
{ 
	getLine = mylines[i].String();
	getLines->Add(getLine); 
}

Whats the compiler error that your getting?

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.