dotnet/maui

Add TryGetValue() to IPreferences

Open

#26,123 opened on 2024年11月26日

GitHub で見る
 (13 comments) (1 reaction) (0 assignees)C# (1,951 forks)batch import
area-essentialsgood first issueproposal/opent/enhancement ☀️

Repository metrics

Stars
 (23,245 stars)
PR merge metrics
 (平均マージ 47d 9h) (30d で 248 merged PRs)

説明

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.

コントリビューターガイド