Participants

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e49bfd4b-2e59-4dcc-b560-150149e69084/Untitled.png

private static void Main()
{
	var studentRecords = new CustomList();
	studentRecords.Add("Samual");
	studentRecords.Add("Jimmy");
	studentRecords.Add("Sandra");	

	studentRecords.Sort(new SortAsc());
	studentRecords.Sort(new SortDesc());
}

public interface ISortStrategy
{
	void Sort(List<string> list);
}

public class SortAsc : ISortStrategy
{
	public void Sort(List<string> list) => list.Sort();
}

public class SortDesc : ISortStrategy
{
	public void Sort(List<string> list)
	{
		list.Sort();
		list.Reverse();
	}
}

public class CustomList
{
	private List<string> _list = new List<string>();
	private ISortStrategy _sortstrategy;

	public void Add(string name) => _list.Add(name);
	public void Sort(ISortStrategy sortstrategy) => sortstrategy.Sort(_list);
}

Rules of Thumb