Items in list list are not showing


username

enter image description here

It shows idfichier, nomclient shows system.linq.enumerable...I guess it is showing the type of nomclient.

public static void generateCTAF(string pathXml, string outputPDF)
        {
            List<FichierCTAF> fc = new List<FichierCTAF>();

            fc = getXmlFCtaf(pathXml);

            foreach (FichierCTAF f in fc)
            {
                Console.WriteLine("ID CTAF : {0} \n Nom Client : {1}\n \n", f.IdFichierCtaf, f.Clients.Select(y => y.NomClient ));
            }

        }

How to display? The picture shows the result I got

Sergey Berezovskiy

You'll find it odd System.Linq.Enumerable+WhereSelectListIteratorbecause it 's the representation ToString()of the list iterator , which is returned by the f.Clients.Select(y => y.NomClient)query .

If you need to display all NomClientvalues, it is recommended that you build a concatenated string of them:

public static void generateCTAF(string pathXml, string outputPDF)
{
    List<FichierCTAF> fc = getXmlFCtaf(pathXml);

    foreach (FichierCTAF f in fc)
    {
        Console.WriteLine("ID CTAF : {0}\n Nom Client : {1}\n\n", 
           f.IdFichierCtaf, 
           String.Join(", ", f.Clients.Select(y => y.NomClient)));
    }
}

Alternatively, you can enumerate NomClientsthe values ​​and print each value on its own line:

public static void generateCTAF(string pathXml, string outputPDF)
{
    List<FichierCTAF> fc = getXmlFCtaf(pathXml);

    foreach (FichierCTAF f in fc)
    {
        Console.WriteLine("ID CTAF : {0}", f.IdFichierCtaf);

        foreach(string nomClient in f.Clients.Select(y => y.NomClient))
            Console.WriteLine(" Nom Client : {0}", nomClient);
    }
} 

Related


Items in list list are not showing

username It shows idfichier, nomclient shows system.linq.enumerable...I guess it's showing the type of nomclient. public static void generateCTAF(string pathXml, string outputPDF) { List<FichierCTAF> fc = new List<FichierCTAF>();

RecyclerView not showing all items in list

Facebook Facebook logo Sign up for Facebook to connect with Ritu Suman Mohanty I RecyclerViewuse in my application. I can only see one item every time I open the screen, but every time I debug the method appears.onBindViewHolder Here is my adapter: @Override p

SwiftUI list not showing all items

Adrian Leroy Dewysing I'm trying to display a list of horizontal scrolling lists in iOS. Some lists show, but others don't, even though they all have data. I placed a debug point and saw that ForEachwith was called on every part EventItemView. I'm not sure wha

list view items not showing in xamarin

hacker I have this as UI: public EditTextPage() { BackgroundImageSource = "blue_gradient1"; this.Title = "Edit Text"; var db = new SQLiteConnection(_dbPath); StackLayout stackLayout = new StackL

RecyclerView not showing all items in list

Facebook Facebook logo Sign up for Facebook to connect with Ritu Suman Mohanty I RecyclerViewuse in my application. I can only see one item every time I open the screen, but every time I debug the method appears.onBindViewHolder Here is my adapter: @Override p

SwiftUI list not showing all items

Adrian Leroy Dewysing I'm trying to display a list of horizontal scrolling lists in iOS. Some lists show, but others don't, even though they all have data. I placed a debug point and saw that ForEachwith was called on every part EventItemView. I'm not sure wha

list view items not showing in xamarin

hacker I have this as UI: public EditTextPage() { BackgroundImageSource = "blue_gradient1"; this.Title = "Edit Text"; var db = new SQLiteConnection(_dbPath); StackLayout stackLayout = new StackL

angular ngFor list items not showing

Destouna I want to display a simple ulelement which has some li. For this I created this component: import { Component } from '@angular/core'; @Component({ selector: 'skin', templateUrl: './skin.component.html', styleUrls: ['./skin.component.css'] }) ex

list view items not showing in xamarin

hacker I have this as UI: public EditTextPage() { BackgroundImageSource = "blue_gradient1"; this.Title = "Edit Text"; var db = new SQLiteConnection(_dbPath); StackLayout stackLayout = new StackL

SwiftUI list not showing all items

Adrian Leroy Dewysing I'm trying to display a list of horizontal scrolling lists in iOS. Some lists show, but others don't, even though they all have data. I placed a debug point and saw that ForEachwith was called on every part EventItemView. I'm not sure wha

RecyclerView not showing all items in list

Facebook Facebook logo Sign up for Facebook to connect with Ritu Suman Mohanty I RecyclerViewuse in my application. I can only see one item every time I open the screen, but every time I debug the method appears.onBindViewHolder Here is my adapter: @Override p

list view items not showing in xamarin

hacker I have this as UI: public EditTextPage() { BackgroundImageSource = "blue_gradient1"; this.Title = "Edit Text"; var db = new SQLiteConnection(_dbPath); StackLayout stackLayout = new StackL

SwiftUI list not showing all items

Adrian Leroy Dewysing I'm trying to display a list of horizontal scrolling lists in iOS. Some lists show, but others don't, even though they all have data. I placed a debug point and saw that ForEachwith was called on every part EventItemView. I'm not sure wha

Hiding and showing list items in list view not working

Jody JK I've used two and one ListViewfor each of these items . I just want to show the second one when the user clicks a list item .TextViewImageViewTextView my code, abc.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public

RecyclerView list items not showing nor playing

Joseph: After coding the recyclerView MediaPlayer, after testing with the emulator, it refuses to show the list of items. I do not know what to do. Please your help is very important to me. All the code below is what I have tried and it doesn't work. This is M

Bootstrap Navbar list items/links not showing

dumb girl I'm learning to use Bootstrap and use components, specifically the navbar. My links/list items are not showing. I copied the code directly from Bootstrap. I hope someone can explain what I'm missing. <head> <meta charset="utf-8"> <meta name="

Bootstrap Navbar list items/links not showing

dumb girl I'm learning to use Bootstrap and use components, specifically the navbar. My links/list items are not showing. I copied the code directly from Bootstrap. I hope someone can explain what I'm missing. <head> <meta charset="utf-8"> <meta name="

Android: RecyclerView not showing list items in fragment

Calvin Castle Can someone help me trying to get my RecyclerView to appear. It appears if I don't implement it in a fragment. However, when I try to implement it as a fragment, the other XML code in (CarFront) is displayed separately from the RecyclerView. I ha

Android: RecyclerView not showing list items in fragment

Calvin Castle Can someone help me trying to get my RecyclerView to appear. It appears if I don't implement it in a fragment. However, when I try to implement it as a fragment, the other XML code in (CarFront) is displayed separately from the RecyclerView. I ha

Knockout.js foreach not showing list of items

Ronald McDonald this doesn't work <div data-bind="foreach:nonAdminIB"> <div><span data-bind="text: explanation"></span>&nbsp;</div> </div> This does show the data, but I've hardcoded the index number and I d

Scrolling div container not showing all list items

bookworm I have a horizontal scrollable div that contains a timeline. However, when you scroll all the way to the far left, it doesn't show the first ~8 list items. I do not know why. Below is my JSbin. JSBIN:https://codepen.io/nerdy-droid/pen/eYmVBeJ Here is

RecyclerView list items not showing nor playing

Joseph: After coding the recyclerView MediaPlayer, after testing with the emulator, it refuses to show the list of items. I do not know what to do. Please your help is very important to me. All the code below is what I have tried and it doesn't work. This is M

RecyclerView list items not showing nor playing

Joseph: After coding the recyclerView MediaPlayer, after testing with the emulator, it refuses to show the list of items. I do not know what to do. Please your help is very important to me. All the code below is what I have tried and it doesn't work. This is M

Array of checkboxes showing checked-in items in a list

John Theodore I have a list of all company roles that can be added to the user, and I get from the user a list of the roles he currently has. Both are what I get from the service. I want to compare the two lists and the roles that exist and check when I displa

RecyclerView list items not showing nor playing

Joseph: After coding the recyclerView MediaPlayer, after testing with the emulator, it refuses to show the list of items. I do not know what to do. Please your help is very important to me. All the code below is what I have tried and it doesn't work. This is M

navbar list items not showing, navbar not sticking on top

david morale I have navbar and have 2 problems. As responsive as it seems, there are two problems. 1. Between 968px and 2001px, the list items will not be displayed on click or hover. After about 2000 pixels, the list item is displayed. Question 2. I want the

List item layout not showing items as full width

Malik Hassan Kayum I'm trying to make a custom list layout and everything works fine (custom class and list adapter)........but the items in the activity are somehow not expanding to full screen. Here is my layout design: <?xml version="1.0" encoding="utf-8"?>

PHP - dropdown list not showing all items in mysql

beast I am trying to make a drop down menu with multiple items listed. For example: this is my database: If you see in that image, if I want multiple rows to have the parent "Far Far Away123", I can only see one of the rows has the parent, it only displays one

Bootstrap Navbar list items/links not showing

dumb girl I'm learning to use Bootstrap and use components, specifically the navbar. My links/list items are not showing. I copied the code directly from Bootstrap. I hope someone can explain what I'm missing. <head> <meta charset="utf-8"> <meta name="