Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
BooleanExtensions.cs
3
5{
9 public static class BooleanExtensions
10 {
16 public static string ToYesNo(this bool b)
17 {
18 return b ? ServiceRef.Localizer[nameof(AppResources.Yes)] : ServiceRef.Localizer[nameof(AppResources.No)];
19 }
20 }
21}
An extension class for the boolean primitive type.
static string ToYesNo(this bool b)
Converts a boolean value to the localized string 'Yes' if true, or 'No' if false.
Base class that references services in the app.
Definition: ServiceRef.cs:31
static IStringLocalizer Localizer
Localization service
Definition: ServiceRef.cs:235