We help IT Professionals succeed at work.
Get Started
Troubleshooting Question

Issue with Blazor Web Assembly string arrays

Last Modified: 2020-11-03
Hoping someone can help me here. A string Array seems to form differently in Blazor Web Assembly from Blazor Server. A String Array declaration in Blazor Server is as expected.
string[] scopeDefault = new string[] { "myString" };
Now compare with Blazor Web Assembly:
Declaration (identical)
string[] scopeDefault = new string[] { "MyString" };

Note the difference in the construct of the array and the Server version does not have a length attribute. I'm using this in a function that requires an iEnumerable interface. When I try and use the string array in Blazor Server, it's fine. In WASM it breaks with "Children could not be evaluated". I've tried constructing a List and same issue.
Any clues anyone ?
Watch Question
This question hasn't been answered yet.
While you wait, find out how you can maximize your capability with the most trusted tool in IT.
Explore More Ask a Question
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE