Are 2 dimensional Lists possible in c#?

后端 未结 9 1569
走了就别回头了
走了就别回头了 2020-11-27 12:44

I\'d like to set up a multidimensional list. For reference, I am working on a playlist analyzer.

I have a file/file-list, which my program saves in a standard list.

9条回答
  •  独厮守ぢ
    2020-11-27 12:55

    another work around which i have used was...

    List itemIDs = new List();
    
    itemIDs.Add( new int[2] { 101, 202 } );
    

    The library i'm working on has a very formal class structure and i didn't wan't extra stuff in there effectively for the privilege of recording two 'related' ints.

    Relies on the programmer entering only a 2 item array but as it's not a common item i think it works.

提交回复
热议问题