Hi all,
I am trying to return all values of arrays and lists in the below code. But I’ve just got their types instead. Any suggestion will be much appreciated!
using System.Linq;
----------------------------------------------------------------------------------------------------------------------
List<Clss> clssLst = new List<Clss>
{
new Clss {strng = "a", strngArry = new string[]{"b","c","d"}, strngLst = {"e","f","g"}},
new Clss {strng = "h", strngArry = new string[]{"i","j","k"}, strngLst = {"l","m","n"}}
};
A = clssLst.Select(clss => clss.strng);
B = clssLst.Select(clss => clss.strngArry);
C = clssLst.Select(clss => clss.strngLst);
----------------------------------------------------------------------------------------------------------------------
public class Clss
{
public string strng;
public string strngArry;
public List strngLst = new List();
}