Now, give a code with the same functionality, but made in C#.