03-10-12, 02:46 PM
والدالة WritrAllLines تقوم بالكتابة داخل الملف على من خلال قراءة مصفوفة من string
والدالة WriteAlltext تقوم بالكتابة في الملف من خلال قراءة نص معين كما في الامثلة التالية
كود :
Dim str4 As String = "hello there there is text here and it will be written to a file"
Dim bb As Byte()
bb = File.ReadAllBytes("c:/sample1.ddt")
File.WriteAllBytes("c:/sample1.ddt", bb)
str2 = File.ReadAllLines("c:/sample1.ddt")
File.WriteAllLines("c:/sample1.ddt", str2)
File.WriteAllText("c:/sample1.ddt", str4)