|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CustomSorterSpecifications
{
class ListBuilder
{
internal static List<ClassToBeSorted> Build()
{
var accountA = new ClassToBeSorted();
accountA.AccountType = "ISA Cash";
accountA.AccountName = "Frank";
accountA.AccountEnum = AccountType.share;
var accountB = new ClassToBeSorted();
accountB.AccountType = "ISA Stock & Shares";
accountB.AccountName = "Jane";
accountB.AccountEnum = AccountType.cash;
var accountC = new ClassToBeSorted();
accountC.AccountType = "ISA x";
accountC.AccountName = "Adam";
accountC.AccountEnum = AccountType.cash;
var accountD = new ClassToBeSorted();
accountD.AccountType = "wrap cash";
accountD.AccountName = "Adam";
accountD.AccountEnum = AccountType.stock;
var accountE = new ClassToBeSorted();
accountE.AccountType = "ISA x";
accountE.AccountName = "Echo";
accountE.AccountEnum = AccountType.cash;
var accountF = new ClassToBeSorted();
accountF.AccountType = "wrap cash";
accountF.AccountName = "Echo";
accountF.AccountEnum = AccountType.share;
var accountG = new ClassToBeSorted();
accountG.AccountType = "ISA Cash";
accountG.AccountName = "Adam";
accountG.AccountEnum = AccountType.share;
var listToBeSorted = new List<ClassToBeSorted>();
listToBeSorted.Add(accountA);
listToBeSorted.Add(accountB);
listToBeSorted.Add(accountC);
listToBeSorted.Add(accountD);
listToBeSorted.Add(accountE);
listToBeSorted.Add(accountF);
listToBeSorted.Add(accountG);
return listToBeSorted;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am an independent IT contractor who is passionate about life and Microsoft technology stack. I have been programming since 2001. Besides coding, I also enjoy diving, swimming, rock climbing and travelling. I swim 2 miles a day to keep my morale and energy level consistently high.