BF2Statistics.Web.ASP.FormattedOutput.AddRow C# (CSharp) Method

AddRow() public method

Adds a new row to the list. If some values are missing, they will be zero filled.
public AddRow ( ) : void
return void
        public void AddRow(params object[] Items)
        {
            // Convert the array into a list
            List<string> Row = new List<string>();
            foreach (object Item in Items)
                Row.Add(Item.ToString());

            // Fill in empty values
            if (Row.Count != RowSize)
                for (int i = Row.Count; i < RowSize; i++)
                    Row.Add("0");

            Rows.Add(Row);
        }

Same methods

FormattedOutput::AddRow ( List Row ) : void

Usage Example

 /// <summary>
 /// Writes a Data line with the specified parameters
 /// </summary>
 /// <param name="Params"></param>
 public void WriteDataLine(params object[] Params)
 {
     if (Transpose)
     {
         Formatted.AddRow(Params);
     }
     else
     {
         ResponseBody.AppendFormat("\nD\t{0}", String.Join("\t", Params));
     }
 }
All Usage Examples Of BF2Statistics.Web.ASP.FormattedOutput::AddRow