Skip to content

Passing C# objects with Blazor JS interop #24646

@pm100

Description

@pm100

if I have

public class Foo{
public String Name
...
}

explain how to pass an instance of this to JS interop

  • pure fields do not work (they need settgers and getters)
  • the member names are changed to match JS naming conventions ie Name => name etc. (a big surprise)

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions