ファイルを開く関数を作成し、新しい行ごとに、PHPでexplode("\n", $var)
のような変数を作成するのに助けが必要です。私は試しましたVB.NETごとに新しい行
Dim words As String = GetFileContents(OpenFileDialog1.FileName)
For Each word As String In words
Dim doHash As String = MD5(word)
If String.Equals(doHash, hash.Text) Then
Label2.Text = "derp"
Else
Label2.Text = "lol"
End If
Next
しかし、それはそれぞれの文字を新しい変数にします。
あなたはおそらく['String.Split'](http://msdn.microsoft.com/en-US/library/tabh47cf%28v=vs.100%29.aspx)を探しています。 C#での爆発の例は次のとおりです。http://www.dotnetperls.com/explode-function –
'GetFileContents'のコードを提供できますか? 'String()'の配列ではなく、単一の 'String'として値を返すようです。あなたがそれらを反復しようとするなら、配列が必要です。 – mellamokb
['String.Split'](http://msdn.microsoft.com/en-us/library/system.string.split.aspx)および/または[' File.ReadLines'](http: /msdn.microsoft.com/en-us/library/dd383503.aspx)。 – vcsjones