[SOLVED] Increase and Decrease size of Class Array in Unity C#

I want to store positions, rotations, ID, texture ID, inside of classes array like this

    [System.Serializable]
    public class ObjectDetails
    {
         public int ObjectID, TextureID; 
         public Vector3[] ObjectPositions;
         public Quaternion ObjectRotations;
    }
    
    public class ObjectScript: MonoBehaviour
    {
          public ObjectDetails[] objectdetails;
    
         void Update()
         {
                // How to add something into ObjectDetails class array
                // I mean how to increase size of the array
         }
    }

How to increase size of ObjectDetails classes.

I found how to add.

public class MyDatas
{
     public Vector position;
}

public List<MyDatas> myDatas;


if (Input.GetKeyDown(KeyCode.N)) 
{
     myDatas.Add(new MyDatas());
}