Closed
Description
If your TryParse
method has a nullable out parameter and is a struct it fails to find the TryParse method and will throw:
System.InvalidOperationException : No public static bool MyBindAsyncRecord.TryParse(string, out MyBindAsyncRecord) method found for myBindAsyncRecord.
private record struct MyBindAsyncRecord(Uri Uri)
{
public static bool TryParse(string? value, out MyBindAsyncRecord? result) =>
throw new NotImplementedException();
}
This is because the method parameter type is Nullable`1[[MyBindAsyncRecord]]&
and we pass MyBindAsyncRecord&