Not recognising publics

Hi guys,im having a problem with my script.

Script1:

List1 list1Object = new List1();
 
[System.Serializable]
{
Public class List1
Public texture2d list1texture;
Public text list1text;
Public int list1int;
}

But when i put list1Object.list1int, it doesnt know what is list1int in the (list1Object)

I tried to do

List1Object.list1int = List1.list1int

But still it doesnt know what is List1Object.list1int.Can anyone provide me with an example script of how this works.Thanks alot ,sorry ive been asking so many questions this week.

By reading your code… you need to start here Learn game development w/ Unity | Courses & tutorials in game design, VR, AR, & Real-time 3D | Unity Learn

Scripting isn’t something you can do by “winging it”. It takes careful practice.

It won’t and can’t know if you dont define List1.
Define List1 first before doing anything with List1 unless you know what you want beforehand and decide to ignore intellisense or any other code completion tool that comes with your tool.