Using lists in C #

I am a top-notch software development student who is currently in the Data Structures and Algorithms class. Our professor wants us to write a program using the List structure found in C ++ STL. I'm trying to use C # more and more, and I was wondering if the ArrayList structure in .NET is a good substitute for implementing an STL list.

+3
source share
7 answers

If you are not stuck in .NET 1.1, use List<T>instead ArrayList. But what mainly bothers you? Suppose you didn’t have a list to refer to - why do you need an appropriate data structure?

+5
source

. , STL? ArrayList? , API STL ( )? STL: , ?

+3

STL , List System.Collections.Generic.

+1

ArrayList . .NET 1.0 , .

System.Collections.Generic.List. :

List<int> myList = new List<int>();
myList.Add(1);
myList.Add(2);
System.Console.WriteLine(myList[0]);

, . , , .

0

Um, ++ STL , "List". , "", . # List, , ++-.

0

quertie, List...

the purpose is to use std :: list to add polynomials using a list of simple structures, a structure that would hold the coefficient and power x ... easy enough, I know, but since the class is supposedly a language - Regardless, I wanted to try use c #

0
source

The closest C # equivalent in std :: list is System.Collections.List. Both are shared collections and implement standard list type actions.

-1
source

Source: https://habr.com/ru/post/1699249/


All Articles