Archive for the ‘programming’ Category


Membaca file teks dengan C#

Tuesday, July 22nd, 2008

using System;
using System.IO;

namespace Belajar {

  class PembacaFileTeks {

    static void Main(string[] args) {

      // membuka file
      StreamReader sr = new StreamReader(”fileku.txt”);

      // baca file per baris
      Console.WriteLine(sr.ReadLine());

      // tutup file
      sr.Close();
    }

  }

}

(lanjut…)