/ 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 Netkachov is a Senior Software Developer, currently working in Central London on new generation of energy trading solutions for brokers, traders and exchanges.

Read More

Why not to chat about this post? Join Telegram group Alex@Net or message on Twitter to alex_at_net. Alternatively, use the comments form below.