You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This triggers WTG3014: Don't use Concat when prepending a single element to an enumerable.
The code-fix changes it to:
varexpected=viewModel.Items.Prepend(viewModel);
However, viewModel and viewModel.Items do not share a common type, so this then causes CS0411: The type arguments for method 'Enumerable.Prepend(IEnumerable, TSource)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
We should probably change this to .Prepend<object> to preserve the explicit typing.
The text was updated successfully, but these errors were encountered:
This triggers WTG3014: Don't use Concat when prepending a single element to an enumerable.
The code-fix changes it to:
However,
viewModel
andviewModel.Items
do not share a common type, so this then causes CS0411: The type arguments for method 'Enumerable.Prepend(IEnumerable, TSource)' cannot be inferred from the usage. Try specifying the type arguments explicitly.We should probably change this to
.Prepend<object>
to preserve the explicit typing.The text was updated successfully, but these errors were encountered: