namespace error with [Serializable]

I receive this error with the code below:

"The type or namespace ‘Serializable’ could not be found (are you missing a using directive or an assembly reference?)

Any help would be greatly appreciated. I’ve been stuck for a couple hours.

using UnityEngine;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using System.Collections.Generic;

public class Test_DataMgr : MonoBehaviour {

    [Serializable]
    public class TestClass
    {
        int TestInt;
    }
}

Nevermind. After 4 hours of pulling hair I’ve found out you just put System.Serializable and it works.

Alternatively, you can add the System tag to the attribute itself. I.E.

public class Test_DataMgr : MonoBehaviour {
 
   [System.Serializable]
    public class TestClass
    {
        int TestInt;
    }
}

More alternatively, add using System so that you can just type [Serializable]. I removed the using System directive when I thought I didn’t need it. Lesson learned, don’t remove directives until you’re done, so, probably never.