تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] قرائة ملف TEXT ووضعه في array
#2
PHP كود :
Imports System
Imports System
.IO

Class Test
    Public Shared Sub Main
()
 
       Try
            
' Open the file using a stream reader.
            Using sr As New StreamReader("TestFile.txt")
                Dim line As String
                ' 
Read the stream to a string and write the string to the console.
 
               line sr.ReadToEnd()
 
               Console.WriteLine(line)
 
           End Using
        Catch e 
As Exception
            Console
.WriteLine("The file could not be read:")
 
           Console.WriteLine(e.Message)
 
       End Try
 
   End Sub
End 
Class 
المصدر
https://msdn.microsoft.com/en-us/library...-snippet-1
وبالنبسبة لقراءة المحتوى وتقطيعه حسب الحاجة
استخدم
split
سبحان الله والحمدلله ولا إله إلا الله والله أكبر
 اللهم اغْفِرْ لِلمؤمنين والمؤمنات والمسلمين والمسلمات الأحياء منهم والأموات
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
RE: قرائة ملف TEXT ووضعه في array - بواسطة أبو عمر - 23-11-15, 09:13 PM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم