Estou estudando C# e estou tentando aprender um pouco de engenharia reversa.
Estou com o seguinte erro:
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();
}
Apresenta o seguinte erro:
Error CS0246 The type or namespace name 'Func' could not be found (are you missing a using directive or an assembly reference?)
Em outro trecho do codigo
ConfigFinder.FindConfigs((ConfigFinder.ConfigListHandler) (arr => base.Invoke(() => configcombo.Items.AddRange(arr))));
Ele me apresenta:
Error CS1660 Cannot convert lambda expression to type 'Delegate' because it
E ainda no codigo
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();
}
apresenta o erro:
Error CS1061 'string[]' does not contain a definition for 'Aggregate' and no extension method 'Aggregate' accepting a first argument of type 'string[]' could be found (are you missing a using directive or an assembly reference?)
O que pode ser?