You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, dear developer.
My .cfg file does not contain sections (like [section]). How i can using libary?
Error
************** Текст исключения **************
Salaros.Configuration.ConfigParserException: This key value pair is orphan, all the keys must be preceded by a section.. On the line no. #2.
at Salaros.Configuration.ConfigParser.BackupCurrentLine(ConfigSection& currentSection, ConfigLine& currentLine, Int32 lineNumber)
at Salaros.Configuration.ConfigParser.ReadKeyAndValue(ConfigSection& currentSection, ConfigLine& currentLine, String lineRaw, Int32 lineNumber, Boolean append, Boolean forceIncludeKey)
at Salaros.Configuration.ConfigParser.Read(String configContent)
at Salaros.Configuration.ConfigParser..ctor(String configFile, ConfigParserSettings settings)
at Launcher_CS.Form1.Form1_Load(Object sender, EventArgs e) in line 43
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean ignoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
Code:
var configFileFromPath = new ConfigParser(@"config.cfg",
new ConfigParserSettings
{
KeyValueSeparator = " ",
MultiLineValues = MultiLineValues.QuoteDelimitedValues
});
string CsName = configFileFromPath.GetValue(null, "name"); // Error
The text was updated successfully, but these errors were encountered:
Hello, dear developer.
My .cfg file does not contain sections (like [section]). How i can using libary?
Error
Code:
The text was updated successfully, but these errors were encountered: