06/11/26 01:46:30
>>404
ごめ、2次元配列だったな
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim sr As New System.IO.StreamReader("c:\data.txt")
Dim buf() As String = sr.ReadToEnd().Split(vbCrLf.ToCharArray())
Dim gyo As Integer = buf.Length - 1
Dim retu As Integer = buf(0).Length - 1
Dim arrbuf() As Integer = Array.ConvertAll(Join(buf, "").ToCharArray(), New Converter(Of Char, Integer)(AddressOf CharToInteger))
Dim arr(gyo, retu) As Integer
Dim p As IntPtr = Marshal.UnsafeAddrOfPinnedArrayElement(arr, 0)
Marshal.Copy(arrbuf, 0, p, arrbuf.Length)
sr.Close()
End Sub
Private Function CharToInteger(ByVal value As Char) As Integer
Return Integer.Parse(value)
End Function