static void Main(string[] args)
    {
        string     line  = "";
        int        count = 0;
        MyTextFile tf    = new MyTextFile();

        using (StreamReader sr = new StreamReader(@"path"))
        {
            while ((line = sr.ReadLine()) != null)
            {
                count += 1;
                if (count >= 3)
                {
                    object[] Arguments = line.Split(',');
                    tf.Commands.Add(Arguments);
                }
            }
        }
        tf.EnumerateCommands();
        Console.ReadLine();
    }
Ejemplo n.º 2
0
    static void Main(string[] args)
    {
        string     line  = "";
        int        count = 0;
        MyTextFile tf    = new MyTextFile();

        using (StreamReader sr = new StreamReader(@"path"))
        {
            while ((line = sr.ReadLine()) != null)
            {
                count += 1;
                if (count == 3)
                {
                    string[] lineThree = line.Split(',');
                    foreach (var l in lineThree)
                    {
                        tf.Commands.Add(l);
                    }
                }
            }
        }
        tf.EnumerateCommands();
        Console.ReadLine();
    }