TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
muktesh
NA
11
0
How to use using Ini?
Oct 19 2008 2:12 PM
i have a form in which there is textBox1 and textBox2. when anybody enter anything in textbox the value will be saved in .ini file on C drive.And when the form re-opens that value retrieves from that .ini file and shows in both textbox.
Following is the code there is only one error in this code.
The error is under using Ini; and it says that(The type namespace name 'Ini' could not be found are you missing a using directive or an assembly reference?).
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Ini; (Error in this line only)
namespace IniTest
{
public class Form1 : System.Windows.Forms.Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
IniFile ini = new IniFile("C:\\test.ini");
ini.IniWriteValue("Info","Name",textBox1.Text);
ini.IniWriteValue("Info","LastName",textBox2.Text);
}
private void Form1_Load(object sender, System.EventArgs e)
{
IniFile ini = new IniFile("C:\\test.ini");
textBox1.Text= ini.IniReadValue("Info","Name");
textBox2.Text = ini.IniReadValue("Info","LastName");
}
}
}
Reply
Answers (
2
)
Error in using Ini plz help
Let user enter number of arrays used