What does this program print?

from Data types
C# 14 / .NET 10 beginner 2 min

What does this program print?

csharp
using System;
using System.Collections.Generic;

var firstPoint = new Point(2);
var secondPoint = firstPoint;
secondPoint.X = 8;

var firstList = new List<int> { 2 };
var secondList = firstList;
secondList[0] = 8;

Console.WriteLine($"{firstPoint.X}, {firstList[0]}");

public struct Point
{
    public Point(int x) => X = x;
    public int X { get; set; }
}
Open in playground
Report an error