thanks to keyboardP. I changed my code to what you suggested
private List <object> values ββ= new List <object> ();
public List <object> Values ββ{get {return values; } set {values ββ= value; }}
It works exactly as I wanted.
One remark in case someone needs it. If you use your own class, for example List <CustomClass> instead of List <object> . In the definition of "CustomClass," do this
[System.Serializable] public class CustomClass { ...... }
Otherwise, you will receive an error message when you try to add items to the list through the properties window.
Another method would also change the List <CustomClass> to CustomClass []
private values ββCustomClass [];
public CustomClass [] Values ββ{get {return values; } set {values ββ= value}}
This second method I did not need to add [System.Serializable] at the beginning of the CustomClass definition.
Hope this helped someone.
source share