Help with Error Code CS0019

So this excerpt of code is from my character controller script on line 34.

 private ControllerParameters2D Parameters { get { return _overrideParameters ?? DefaultParameters; } }

I’m getting a Error Code CS0019, stating, “Operator ‘??’ cannot be applied to operands of type ‘ControllerParameters2D’ and ‘ControllersParameters2D’”

I know this is also referring to the ControllerParameters2D script I made. The code is here below:

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[Serializable]
public class ControllersParameters2D
{
    public enum JumpBehavior
    {
        CanJumpOnGround,
        CanJumpAnywhere,
        CantJump
    }

    public Vector2 MaxVelocity = new Vector2(float.MaxValue, float.MaxValue);

    [Range(0, 90)]
    public float SlopeLimit = 30;

    public float Gravity = -25f;

    public JumpBehavior JumpRestrictions;

    public float JumpFrequency = .25f;
}

I’m very new to C# coding. I even copied this from the 9th video of the Creating a 2D Game in Unity 4.5 tutorial at Udemy. I know this code was originally for an older version of Unity and since I’m using Unity 5.6.1f1, I’m sure that some of the code is incompatible with the newer version.

Please help me and explain to me in depth the logic behind it.

I did. I should’ve posted that part of the code in the first place. :confused:

 public LayerMask PlatformMask;
    public ControllersParameters2D DefaultParameters;
    public ControllerState2D State { get; private set; }

    private readonly Vector2 velocity;

    public Vector2 GetVelocity()
    {
        return velocity;
    }

    public bool CanJump { get { return false; } }
    public bool HandleCollisions { get; set; }
    private ControllerParameters2D Parameters { get { return _overrideParameters ?? DefaultParameters; } }

    private Vector2 _velocity;
    private Transform _transform;
    private Vector3 _localScale;
    private BoxCollider2D _boxCollider;
    private ControllerParameters2D _overrideParameters;

The problem is a mix of different classes here:

ControllerParameters2D and ControllersParameters2D

DefaultParameters is the latter where the return type of the property and _overrideParameters is the former.