CipherIS
asked on
C# Convert System.Array to a List keeping all indexes in the List from System.Array.
I'm converting a System.Array to a list. Reason I'm doing this is because I can't check the values I want with _excelvalues[1,5].
Example:
System.Array[1,12] -> List[12]
Right now I can get System.Array[1,12] -> List[6]
System.Array excelvalues = (System.Array)_excelsheet.get_Range("A" + index.ToString(),
"K" + index.ToString()).Cells.Value;
var values = excelvalues.OfType<object>().Select(o => o.ToString()).ToList();
How do I convert BUT migrate everything from the System.Array to the list. If it is empty the length of the List does not match the System.Array and I want it to always match.Example:
System.Array[1,12] -> List[12]
Right now I can get System.Array[1,12] -> List[6]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.