1
0

feat: add a couple extra comments

This commit is contained in:
Rokas Puzonas 2022-04-10 17:18:41 +03:00
parent 7695bc6987
commit 83883e81ef
2 changed files with 12 additions and 0 deletions

View File

@ -137,6 +137,13 @@ namespace LD_24.Code
writer.WriteLine("|"); writer.WriteLine("|");
} }
/// <summary>
/// Calculate the widths of each column of a table
/// </summary>
/// <param name="rows"></param>
/// <param name="header"></param>
/// <param name="columns"></param>
/// <returns></returns>
private static LinkedList<int> FindTableWidths(LinkedList<LinkedList<string>> rows, string header, string[] columns) private static LinkedList<int> FindTableWidths(LinkedList<LinkedList<string>> rows, string header, string[] columns)
{ {
var allWidths = new Dictionary<int, LinkedList<int>>(); var allWidths = new Dictionary<int, LinkedList<int>>();

View File

@ -57,6 +57,11 @@ namespace LD_24.Code
return hashCode; return hashCode;
} }
/// <summary>
/// Compares 2 products by their IDs
/// </summary>
/// <param name="other"></param>
/// <returns></returns>
public int CompareTo(Product other) public int CompareTo(Product other)
{ {
return ID.CompareTo(other.ID); return ID.CompareTo(other.ID);