null values in a string array
I have a code that reads in a text file of numbers that are both tab delimited as well as a carriage return at the end of each line. I have read the file into a string array, but the array does not get rid of the null values. How do I do this? Here is what I have thus far. Thanks for any help!
using System;
using System.IO;
using System.Collections;
namespace try_again
{
class Class1
{
static void Main(string[] args)
{
StreamWriter swa = new StreamWriter ("c:\\afinal.txt");
StreamReader sra = new StreamReader ("c:\\ChristineWork\\test1.txt");
string aLine = sra.ReadToEnd();
string[] TokenBuffer = aLine.Split(new Char [] {' '});
foreach(string token in TokenBuffer)
{
if(token.Length !=0)
Console.WriteLine(token);
}
Console.ReadLine();
sra.Close();
calfsonPosted Oct 20, 2004, 8:54 AM
bilnaadPosted Oct 18, 2004, 7:24 PM
calfsonPosted Oct 18, 2004, 11:47 AM
calfsonPosted Oct 18, 2004, 11:47 AM
bilnaadPosted Oct 18, 2004, 10:48 AM
calfsonPosted Oct 18, 2004, 10:43 AM
bilnaadPosted Oct 18, 2004, 10:03 AM
calfsonPosted Oct 18, 2004, 9:59 AM
bilnaadPosted Oct 18, 2004, 9:43 AM
calfsonPosted Oct 18, 2004, 9:39 AM
bilnaadPosted Oct 18, 2004, 9:25 AM
bilnaadPosted Oct 18, 2004, 9:23 AM
calfsonPosted Oct 18, 2004, 9:02 AM
bilnaadPosted Oct 18, 2004, 8:54 AM
calfsonPosted Oct 18, 2004, 8:51 AM
bilnaadPosted Oct 15, 2004, 7:11 PM