Checking foreach loop list results C# -


I have a bit of code in a class:

  public class ticketsSummary { / All development tickets public list & lt; IncidentSummary & gt; get receive. Get All Development Tickets { Set; } Public listing & lt; String & gt; Ticket name () {list & lt; String & gt; V = new list & lt; String & gt; (); Foreign currency (all development tickets in all development tickets) {var TicketIIS = DevelopmentTicket.Id.ToString (CultureInfo.Inventarian Culture); V.Add (ticketIds); } Return V; }}}  

And I am trying to see if my API connection (plus all code) has done this job and has withdrawn the tickets and their information, especially ID

I do not have any clue in my main program to check how this is a job. I tried something but it is not perfect and does not return anything (I know that I need a console. WrightLine)

  Fixed zero main (string [] arg) {Console .ReadLine (); Var Tickets = New Ticket (); Tickets.TicketNames (); While (ticket! = Null) {Console.WriteLine (ticket); }}  

Any suggestions, please?

Thank you!

You get the TicketNames () way. This ticket does a lot of work to return the string version of ID. It can be reduced

  public list & lt; String & gt; TicketNames () {Go back to AllDevelopmentTickets. Select (T = & gt; TID. ToString (CultureInfo.InvariantCulture)) .Oolist (); } Var stamping = new ticket limit (); Var ticketname = ticket surie Ticket name (); Foreign currency (ticket name in ticket name) {Console.WriteLine (ticket name); }  

or even just:

  foreach (all ticket names in AllDevelopmentTickets). Select (t = & gt; TID ToString (CultureInfo.InvariantCulture))) {Console.WriteLine (name of ticket); }  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -