-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed as not planned
Closed as not planned
Copy link
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Collectionsos-browserBrowser variant of arch-wasmBrowser variant of arch-wasm
Description
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 wasmExpected 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:
- http://localhost:5031/
- It will output
isCollectionastrue - The exact code/page: https://github.com/tesar-tech/blazor_wasm_vs_server_bug/blob/master/blazor_wasm_vs_server_bug/Components/Pages/Home.razor
- It will output
- http://localhost:5031/wasmhome
- It will output
false(it will briefly havetruebecause of pre-rendering, but that's not the point) - The exact code/page: https://github.com/tesar-tech/blazor_wasm_vs_server_bug/blob/master/blazor_wasm_vs_server_bug.Client/WasmHome.razor
- It will output
Exceptions (if any)
No response
.NET Version
9.0.100 (but was also on 8)
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Collectionsos-browserBrowser variant of arch-wasmBrowser variant of arch-wasm