Barclays interview question

Basic C# and oops questions.