Hexagon Interview Question

i was asked basic c# questions.