using System;
namespace MyProgram
{
class Point
{
public readonly int X;
public readonly int Y;
public Point (int x, int y)
{
X = x;
Y = y;
}
^ That is the parent class
namespace MyProgram
{
class MapLocation : Point
{
public MapLocation(int x, int y, Map map) : base(x, y)
^ This is the child class
Basically, my question is: How does the passing of parameters between classes work? What is an easy way to remember the rules of passing parameters around? And also, where it says public MapLocation(int x, int y, Map map) : base(x, y)
, I don't understand why it's just x, y and not 'int'?. C# is becoming very frustrating and I'm not having very much fun :( Help would be appreciated.