/ 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 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.