ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
If you need to show "Yes" or "No" depending on some bool property
public static string GetBoolString(this bool value) { return value ? "Yes" : "No"; }
string active = viewModel.IsActive.GetBoolStringFor();
Author: Djordje Djukic
Submitted on: 10 jul. 2016
Language: C#
Type: string
Views: 4010