Ramco Ramco

Ramco Ramco

  • 419
  • 3.4k
  • 527.9k

Cannot convert lambda expression to type 'Delegate'

Apr 6 2024 12:47 PM

Hi

  I am getting error - Cannot convert lambda expression to type 'Delegate' because it is not a delegate type

dgvWindows.BeginInvoke(() =>
            {
                if (!_isRunning)
                    return;

                var row = dgvWindows.Rows[dgvWindows.Rows.Add()];
                row.Cells[0].Value = handle;
                row.Cells[1].Value = _driver == null ? string.Empty : _driver.Title;
                row.Cells[2].Value = state;
                row.Cells[3].Value = $"{_duration.Hours:00}:{_duration.Minutes:00}:{_duration.Seconds:00}";
                row.HeaderCell.Value = row.Index + 1;

                BeginInvoke(() => Text = $"YouTube Tools - {row.Index + 1}");
            });

Thanks


Answers (1)