All pastes #425130 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-04-05 08:38 UTC
rendered paste body
namespace Hagbard
{
	public class MainApplication
	{
		public static void Main()
		{
			Hagbard.Node node1 = new Hagbard.Node("Michael", 18);
			
			Hagbard.Node node2 = new Hagbard.Node("Hagbard", 17);
			
			System.Console.WriteLine(node1.name, node1.age); // Does not print out the age.
			System.Console.WriteLine(node2.name, node2.age); // Does not print out the age.
			System.Console.WriteLine(node1.age); // Prints the age.
		}
	}
	
	struct Node
	{
		public Node(string name, int age)
		{
			this.name = name;
			this.age = age;
		}
		internal string name;
		internal int age;
	}
}