dotnet/maui

Add TryGetValue() to IPreferences

Open

#26.123 aperta il 26 nov 2024

Vedi su GitHub
 (13 commenti) (1 reazione) (0 assegnatari)C# (1951 fork)batch import
area-essentialsgood first issueproposal/opent/enhancement ☀️

Metriche repository

Star
 (23.245 star)
Metriche merge PR
 (Merge medio 47g 9h) (248 PR mergiate in 30 g)

Descrizione

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.

Guida contributor