Skip to content

[ObservableProperty] is not needed for ObservableCollection<T>, right? #559

@suugbut

Description

@suugbut

I think [ObservableProperty] is not needed for ObservableCollection<T>.

I propose the following:

public MainViewModel(IConnectivity connectivity)
{
        this.connectivity = connectivity;
}
public ObservableCollection<string> Items { get; } = [];

instead of

public MainViewModel(IConnectivity connectivity)
{
        Items = [];
        this.connectivity = connectivity;
}
[ObservableProperty]
ObservableCollection<string> items;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions