BF2Statistics.Web.Bf2Stats.BF2PageModel.WriteIfElse C# (CSharp) Method

WriteIfElse() public method

Returns a string based on the value of the condition variable
public WriteIfElse ( bool condition, string trueValue, string falseValue ) : string
condition bool a bool indicating whether the condition is met
trueValue string The value to return if the condition is met
falseValue string The value to return if the condition is NOT met
return string
        public string WriteIfElse(bool condition, string trueValue, string falseValue)
        {
            return (condition) ? trueValue : falseValue;
        }