How to Embedd text files in a DLL and call specific sections of these files

Hi All , I am new in I need to know where to start to create a dll which contains named text files. and then call a section of one of these text files from the main form.
thank you in advance.
Who is Participating?
Here is a link for accessing an image as an embedded resource.

To apply this to your situation:
Add the text file to your project (AssemblyName) and set the Build Action property for that file in Solution Explorer/Property window to Embedded Resource.

then use the following to access the text:

Private Sub DisplayText()
    Dim sr As new System.IO.StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("AssemblyName.MyText.txt"))
    Dim myString as string = sr.ReadToEnd
End Sub
Question has a verified solution.

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.

All Courses

From novice to tech pro — start learning today.