1
Answer

Cannot convert lambda expression to type 'Delegate'

Photo of Ramco Ramco

Ramco Ramco

1y
623
1

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)