-2
テキストファイル(#Hostnameという行の下)に値を取得しようとしています。これは、ホスト名が純粋に整数(int.TryParse)だったときに使用されましたが、現在は文字列(string.TryParse)を使用しています。 "'string'に 'TryParse'の定義が含まれていないため、 「他に何か使えますか?'string'に 'TryParse'bの定義が含まれていません
private void GetGeneralConfig()
{
// lets grabs the info from the config!
var lines = File.ReadAllLines("general_settings.ini");
var dictionary = lines.Zip(lines.Skip(1), (a, b) => new { Key = a, Value = b })
.Where(l => l.Key.StartsWith("#"))
.ToDictionary(l => l.Key, l => l.Value);
// lets define variables and convert the string in the dictionary to int for the sock.connection method!
string.TryParse(dictionary["#Hostname"], out hostname);
}