How to access inner list item in c#
  • Hi all i am working on windows phone and now i am facing issue to access inner list item through outer list index in c#
    i have a json class like follow
    public List<List<string>> Professions { get; set; }
  • 2 Comments sorted by
  • Hello
    You can use foreach or for loop to access list items For example

    using System;
    using System.Collections.Generic;

    class Program
    static void Main()
    List<int> list = new List<int>();

    foreach (int prime in list) // Loop through List with foreach.

    for (int i = 0; i < list.Count; i++) // Loop with for.
    You can also Access them like this
      int index = // some index
    // now, ClassName[index] is a Person
    // and we can access its accessible properties Replace ClassName with your class name in below line

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook


Popular Posts of the Week

    Optimum Creative