VB.Net by API/System.IO/StringReader — различия между версиями

Материал из VB Эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Текущая версия на 12:50, 26 мая 2010

StringReader.ReadLine()

  
Imports System
Imports System.IO
Imports System.Text

Public Class MainClass
   Shared Sub Main()
        " Use a StringWriter to write into a string.
        Dim string_writer As New StringWriter()
        string_writer.WriteLine("www.vbex.ru")
        string_writer.WriteLine("www.vbex.ru")
        " Use a StringReader to read from the string.
        Dim string_reader As New StringReader(string_writer.ToString)
        string_writer.Close()
        Console.WriteLine(string_reader.ReadLine())
        Console.WriteLine(string_reader.ReadToEnd())
        string_reader.Close()
   End Sub 
End Class


StringReader.ReadToEnd()

  
Imports System
Imports System.IO
Imports System.Text

Public Class MainClass
   Shared Sub Main()
        " Use a StringWriter to write into a string.
        Dim string_writer As New StringWriter()
        string_writer.WriteLine("www.vbex.ru")
        string_writer.WriteLine("www.vbex.ru")
        " Use a StringReader to read from the string.
        Dim string_reader As New StringReader(string_writer.ToString)
        string_writer.Close()
        Console.WriteLine(string_reader.ReadLine())
        Console.WriteLine(string_reader.ReadToEnd())
        string_reader.Close()
   End Sub 
End Class