0

hi,

I am new to these online threads ..
i had a question: i am migrating vb6 to vb.net.
the ini.file of vb6 has to be converted to app.config file, and we has to use this app.config in our code by removing ini file.
how to create app.config for this inifile... please any one can respond quickly.

my inifile is like this ..
[Parms]
Language=English

[Enlish]
1=Product Library Copy
2=Sorce File.
3=Destination File
4=Browse..
5=Copy Files
6=Exit
7=Cannot Copy File:
8=Destination file exits.Overwrite?
9=File have been copied
12=Pro/Space Product Libraries

[Japanese]
1= >>.if%fcfuf%fSfRsgdg
2=f\[fXftf@fCf<:
3=fRs[$,Iftf@fCf<:
4=ZQAC....
5=...............Like this till 12 fields......

2
Contributors
1
Reply
10
Views
6 Years
Discussion Span
Last Post by C#Jaap
0

The configuration is put into a XML file like this

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="errormail.verzenden" value="1"/>
    <add key="errormail.address.from" value="noreply@hello.com"/>
    <add key="errormail.address.to" value="paperclip@msn.com"/>
    <add key="errormail.address.cc" value=""/>
  </appSettings>
</configuration

You can retrieve these settings with

string keyValue = System.Configuration.ConfigurationManager.AppSettings[KeyName];

or in VB.NET

Dim keyValue as string = System.Configuration.ConfigurationManager.AppSettings(KeyName)

You also have to add an reference to System.configuration to your project. (project references)

For addition info see e.g. the MSDN at the Microsoft-site

Edited by C#Jaap: Additional information

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.