By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,739 Members | 2,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,739 IT Pros & Developers. It's quick & easy.

convert text file to resource file and extract values from resource files

P: 82
I am developing an application in which i need to convert a text file into a resource file and then serach different resources from the resource file.
I want to know how to create the resource file and how shall i extract the value from resource file.
Please help its urgent
Mar 29 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 797
First up create your text file that will hold the data for your resource.

Second, in solution explorer, right click your project name and select properties. The properties window will now appear, select Resources down the left hand side and click the dropdown arrow on the Add Resource button. Select "Add existing file...". Find your file and click open to add it into your project as an embedded resource.

Lastly if your resource file is plaintext, it will be stored as a string, so you can reference it using:
Expand|Select|Wrap|Line Numbers
  1. Dim MyResource As String = My.Resources.MyResourceFile
Expand|Select|Wrap|Line Numbers
  1. string MyResource = My.Resources.MyResourceFile;
You can then parse the string for the information.
Mar 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.