I have an application that returns a user but the output is System.String[]
would like me to give me the real value of the array.
How can I do this?
Here is my code of the way I passed the parameters.
Thanks
UserData[] userDataId = GetUserData(DataSourceId);
List<string> multiUserIDs = new List<string>();
if (userDataId.Length > 0)
{
foreach (var userdata in userDataId)
{
multiUserIDs.Add(userdata.List[0].ToString()); //esto me devuelve la lista de array como System.String[]
}
}
By making the changes and adding multiUserIDs.Add(String.Join(",", userdata.List[0]));
the output appears to me as System.Collections.Generic.List
1 [System.String] '
This appears to me when the result is written in a .CPDF file in the following way:
ReportEntry[] report = db.GetReports(multiUserIDs.ToArray());
for (int i = 0; i < report.Length; ++i)
{
textBox1.Text +=
"ReportID: " + report[i].ReportID + "\r\n" +
"ReportTitle: " + report[i].ReportTitle + "\r\n" +
"Link: " + siteUrl + System.IO.Path.GetFileName(report[i].Link);
string outCsvFile = string.Format(@"C:\ReportsPDF\{0}.pdf", multiUserIDs.ToString() + "_" + report[i].ProjectTitle);
}
Where the problem is that the file is created after the next execution
string outCsvFile = string.Format(@"C:\ReportsPDF\{0}.pdf", multiUserIDs.ToString() + "_" + report[i].ProjectTitle);