Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor Server vs WASM - different output on enumerable is ICollection<int> #59719

Open
1 task done
tesar-tech opened this issue Jan 4, 2025 · 0 comments
Open
1 task done
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@tesar-tech
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Blazor app and this code:

List<int> list = [1,2,3];
IEnumerable<int> enumerable =list.Take(2);
bool isCollection = enumerable is ICollection<int>;

Console.WriteLine($"is ICollection: {isCollection} "); //true on server, false on wasm

Expected Behavior

The result should be the same on Blazor Servers and Blazor Wasm.

Steps To Reproduce

Clone this bug report repo (simple blazor app), run the app and visit:

Exceptions (if any)

No response

.NET Version

9.0.100 (but was also on 8)

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

1 participant