Retrieve a Text File from an Assembly's Resources



Retrieves the text from a file that is an embedded resource of an assembly.

'Namespace: System.IO
'Namespace: System.Reflection
'Namespace: Microsoft.VisualBasic

Dim executingAssembly As Assembly = Assembly.GetExecutingAssembly
        Dim appStream As Stream = executingAssembly.GetManifestResourceStream(ResourceName)
        Dim textStream As New StreamReader(appStream)
        Dim text As String = textStream.ReadToEnd

Share |

 Cant find the page you are looking for?
 Help us to improve by adding the content that you are looking for.
 Leave a feedback
 We look forward to hear your comments and feedback.