Assuming you have added the files as resources, select the file(s) in the Solution Explorer and make sure the "Build Action" property is set to "Embedded Resource"
You can then get to the text like this:
Dim filetext As String
Dim ass As Assembly = GetType(yourClassName).Assembly
Using reader As New StreamReader(ass.GetManifestResourceStream("yourNamespace.yourTextFile.txt"))
fileText = reader.ReadToEnd()
End Using
You can also load the text of the file with
fileText = My.Resources.Resource1.yourFileName
If you are loading XML in this way then remember to use the
LoadXml
method and
not Load
because the file will have been returned as a (large) string NOT a file name