How do i declare an indexed property?
public class PublishProperties : ScriptableObject {
List<string> m_shellPathsT = new List<string>();
List<string> m_shellPathsL = new List<string>();
public List<string> ShellPath[int index]
{
get
{
if (index == 0)
return m_shellPathsT;
else
return m_shellPathsL;
}
}
This doesn't compile and Im not sure how to code this. Because of other requirements i have to have the two different lists which are declared like this.
I normally would have an array of lists...
or like this
public List<string>[] m_shellPaths = { new List<string>(), new List<string>() };
however this again doesn't work with other factors... (basically there is some serialization that happens automatically that doesn't work with variables declared in a constructor or like the above. )