Run await inside constructor

Jassim Al Rahma 1,616 Reputation points
2022-01-10T21:17:49.937+00:00

Hi,

How can I have an await inside a constructor? I want to have the following:

await Task.WhenAny<bool>
(
    StackLayoutSignin.TranslateTo(0, 0, 500),
    StackLayoutSignin.FadeTo(1, 1000)
);

Thanks,
Jassim

Developer technologies | C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.