1
Answer

Error - A Static readonly field cannot be assigned

Photo of Ramco Ramco

Ramco Ramco

1y
404
1

Hi

  I am getting error - A Static readonly field cannot be assigned except in a static construcor or a variable initializer.

static async Task Main(string[] args)
        {
            _duration = TimeSpan.Zero;
            _random = new Random();
            await Start();
        }

Thanks

Answers (1)