dotnet/maui

Add TryGetValue() to IPreferences

Open

#26.123 geöffnet am 26. Nov. 2024

Auf GitHub ansehen
 (13 Kommentare) (1 Reaktion) (0 zugewiesene Personen)C# (23.245 Stars) (1.951 Forks)batch import
area-essentialsgood first issueproposal/opent/enhancement ☀️

Beschreibung

Description

Currently IPreferences allows checking if the property exists via ContainsKey(string key) method but it would be nice if it had a TryGetValue<T>(string propertyName, out T value)

Public API Changes

Public TryGetValue<T>(string propertyName, out T value) would be added to the IPreferences interface.

Intended Use-Case

More concise code.

Contributor Guide