![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
01/08/2013, 09:30
|
![Avatar de murdoc92](http://static.forosdelweb.com/customavatars/avatar462903_1.gif) | | | Fecha de Ingreso: mayo-2012 Ubicación: Santiago
Mensajes: 58
Antigüedad: 12 años, 9 meses Puntos: 3 | |
Respuesta: Leer archivo txt el método split te corta los objetos string y retorna un array de tipo string con los fragmentos de textos cortados. Mira te dejo este ejemplo en c#, en vb es lo mismo pero con la sintaxis de vb (Hay algunos conversores online de c# a vb). Los datos quedan guardados en el objeto "lines".
StreamReader objReader = new StreamReader("c:\\test.txt");
string sLine="";
List<string[]> lines = new List<string[]>();
while (sLine != null)
{
sLine = objReader.ReadLine();
if (sLine != null)
lines.Add(sLine.Split(','));
}
objReader.Close(); |