Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using ManagedClient;
- class Program
- {
- static void Main()
- {
- const string CS = "host=127.0.0.1;user=1;password=1;";
- using (ManagedClient64 client = new ManagedClient64())
- {
- client.ParseConnectionString(CS);
- client.Connect();
- string fileName = client.Database + ".ini";
- // string fileName = "NoSuchFile" + ".ini";
- string text = client.ReadTextFile
- (
- IrbisPath.MasterFile,
- fileName
- );
- if (string.IsNullOrEmpty(text))
- {
- Console.WriteLine("Тут ничего нет, расходимся!");
- }
- else
- {
- IniFile iniFile = IniFile.ParseText<IniFile>(text);
- string itemNumb = iniFile.GetString
- (
- "Search",
- "ItemNumb",
- "0"
- );
- Console.WriteLine(itemNumb);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement