Explanation of the Value parameter in Class constructor
Hello! I am following tutorials on Game Dev with C# and MonoGame to improve and practice my basic OOP programming knowledge with C#. I am trying to understand which is the meaning of "value" in the following, which I suppose to be a constructor:
public ContentManager Content { get { return _content; } set { if (value == null) { throw new ArgumentNullException(); } _content = value; } }
The class constructor pasted above is inside the class Game : IDisposable that comes from the Microsoft.Xna.Framework. Specifically, I don't understand where the "value" comes from and how it is handled, as it seems to me to be a parameter passed inside such a class constructor: At the same time, the constructor seems parameterless to me, as there is no () after the name of the constructor... I suppose I am missing some OOP key concepts in this regard; please help me to understand
More in general, this "Content {get;set;}" is called to load the content inside the game, in the LoadContent method of the Game.cs: