I have a class that has the following property:
public Action<bool> Action { get; private set; }
And I have a constructor that takes Action<bool> as an argument.
Now I want to add another constructor that accepts an object of type Action. How can I convert Action to Action<bool>? The bool-parameter should be true in this case.
Now you could instantiate this class in 2 ways depending on which one of the 2 constructors you want to invoke:
var foo = new Foo(x => { Console.WriteLine("Hello"); });(calls the first ctor)var foo = new Foo(() => { Console.WriteLine("Hello"); });(calls the second ctor)