-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoolExtensions.cs
27 lines (27 loc) · 1001 Bytes
/
BoolExtensions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// *****************************************************
// EXTENSIONS
// by Shane Whitehead
// bwakabats@gmail.com
// *****************************************************
// The software is released under the GNU GPL:
// http://www.gnu.org/licenses/gpl.txt
//
// Feel free to use, modify and distribute this software
// I only ask you to keep this comment intact.
// Please contact me with bugs, ideas, modification etc.
// *****************************************************
namespace BWakaBats.Extensions
{
public static class BoolExtensions
{
/// <summary>
/// Create a Javascript-friendly version of the boolean expresstion
/// </summary>
/// <param name="source">A C# True or False value</param>
/// <returns>true or false</returns>
public static string ToJavaString(this bool source)
{
return source ? "true" : "false";
}
}
}