Improve company productivity with a Business Account.Sign Up
Dim initials As String = ""
Dim initialsFound As Boolean = False
Dim lines() As String = System.IO.File.ReadAllLines("c:\some path\folder\file.ext")
For Each line As String In lines
If line.ToLower.StartsWith("initials:") Then
initials = line.Remove(0, "initials:".Length)
initialsFound = True
If initialsFound Then
Open in new window
Dim contents As New List(Of String)(IO.File.ReadAllLines("C:\abc.txt"))
Dim keyword As String = contents.Find(Function(c) c.StartsWith("Initials:")).Split(":")(1)
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Your question, your audience. Choose who sees your identity—and your question—with question security.