VB.NET質問スレ (Part20) at TECH
VB.NET質問スレ (Part20) - 暇つぶし2ch127:デフォルトの名無しさん
07/03/14 23:36:37
>>126
Dim a As New IO.FileStream("C:\a.txt", IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.None)
Dim count As Integer
Dim Bytes(a.Length - 1) As Byte
For I As Integer = a.Length - 2 To 0 Step -1
 a.Position = I
 If a.ReadByte() = 13 And a.ReadByte() = 10 Then
  count += 1
  If count = 1000 Then
   a.Read(Bytes, 0, a.Length - I)
   TextBox1.Text = System.Text.Encoding.GetEncoding("Shift-jis").GetString(Bytes)
   Exit For
  End If
 End If
Next
a.Close()

エンコードはシフトJIS
勘で作ったから保障はしないよ


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch