/ Quiz

.NET Quiz Question

I will post some programming language quiz questions from time to time. That's the first C# question:

public static void Main() {
  var u = new User();
  u.Name = "Tim";
  UpdateName(u, "Tom");
  Console.WriteLine($"Name is {u.Name}");
public static void UpdateName(User user, string name) {
  user.Name = name;

Questions: How to print "Tom"? How to print "Tim"?

Alex Netkachov

Alex Netkachov

Alex likes functional programming, algorithms and code reviews. Apart from programming, his favourites are walking with his family in the parks and national trails and reading books.

Read More

Why not to stay updated if the subject is interesting? Join Telegram channel Alex@Net or follow alex_at_net on Twitter. Or just, use the comments form below.