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

WriteIf() public method

Returns a string in the contents variable if the condition is met
public WriteIf ( string contents, bool condition ) : string
contents string The contents to be returned if the condition is met
condition bool a bool indicating whether the condition is met
return string
        public string WriteIf(string contents, bool condition)
        {
            return (condition) ? contents : String.Empty;
        }