Hi there everyone.
I was hoping you guys could help me out again.
I would like to write a setting to a certain line in a textdocument, for example "4000" at line 5 of the document.
So far i have this:

void MainSettings::setSettingsToFile(String *numChannels, String *savePath, String *playlistPath)
// Here the settings will be written to the settings file
{
	// Declare variables
	strMixChannels = numChannels;
	strSettingsSavePath = ".\Settings.ini;
	strPlaylistPath = playlistPath;
	strSavePath = savePath;
	pStream = new FileStream(strSettingsSavePath, FileMode::Create);
	pWriter = new StreamWriter(pStream);

	// Write the number of mixchannels to the settings file
	pWriter->WriteLine(strMixChannels);
	pWriter->WriteLine(strSavePath);
	pWriter->WriteLine(strPlaylistPath);
	pWriter->Flush();
	pWriter->Close();
	pStream->Close();
}

But as you can see all atttributes now are being set in one method, and i can say what goes at what line.
I want to make different methods for each attribute, however i will need to know how to give it a specific location in the document for that.
So please, if you know how to do this, all help is appreciated.

Is this C#? (certainly not C or C++). You sure this is in the right forum?

>> (certainly not C or C++).
It looks like Managed C++. But I agree that this question would be better asked in a .NET forum.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.