C# Overloading Example showcases confusing returns
Here is the code I'm working with: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { Score tm1 = new Score(2, 3); Score tm2 = new Score(4, 2); Score finalScores = tm1 + tm2; Console.WriteLine("Round 1: " + finalScores.round1Score); Console.WriteLine("Round 2: " + finalScores.round2Score); } } class Score { public int round1Score { get; set; } public int round2Score { get; set; } public Score(int r1, int r2) { round1Score = r1; round2Score = r2; } //your code goes here public static Score operator+ (Score a, Score b) { int r1 = a.round1Score + b.round1Score; int r2 = a.round2Score + b.round2Score; Score res = new Score(r1, r2); return res; } } } It's fully functional, it was the answer to a question on the C# intermediate course...but although I wrote it I don't quite understand it. How can an object be "returned" as it is here: >Score res = new Score(r1, r2); >return res; Idk why it's confusing me so much, it just is...usually when something is returned it's a variable. Like return x or something like that. But an object....what does that really mean? What does it entail? What can you do now that a method, in this case the overloaded "+" is returning an object, especially one that has 2 parameters?