ReSharper suggests changing the following code:
if (MyString is string myString)
{
//...
}
to object pattern:
if (MyString is { } myString)
{
//...
}
It says:
The source expression is always of pattern's type, matches on all non-null values.
I have never seen this syntax before, and I cannot find any documentation of it. What is it and what does it do?