I'm studying C # and am trying to learn a bit of reverse engineering.
I have the following error:
private void button1_Click(object sender, EventArgs e)
{
this.Result = true;
this.ConfigName = this.textBox1.Text;
string sourceFileName = new string[] { Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Tibia", this.BaseName }.Aggregate<string>(new Func<string, string, string>(Path.Combine));
string destFileName = new string[] { Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Tibia", this.ConfigName }.Aggregate<string>(new Func<string, string, string>(Path.Combine));
File.Copy(sourceFileName, destFileName);
base.Close();
}
Displays the following error:
Error CS0246 The type or namespace name 'Func' could not be found (are you missing a directive or an assembly reference?)
In another section of the code
ConfigFinder.FindConfigs((ConfigFinder.ConfigListHandler) (arr => base.Invoke(() => configcombo.Items.AddRange(arr))));
He introduces me:
Error CS1660 Can not convert lambda expression to type 'Delegate' because it
And still in code
private void button1_Click(object sender, EventArgs e)
{
this.Result = true;
this.ConfigName = this.textBox1.Text;
string sourceFileName = new string[] { Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Tibia", this.BaseName }.Aggregate<string>(new Func<string, string, string>(Path.Combine));
string destFileName = new string[] { Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Tibia", this.ConfigName }.Aggregate<string>(new Func<string, string, string>(Path.Combine));
File.Copy(sourceFileName, destFileName);
base.Close();
}
displays the error:
Error CS1061 'string []' does not contain a definition for 'Aggregate' and no extension method 'Aggregate' accepting the first argument of type 'string []' could be found reference?)
What can it be?