Questions tagged as 'lista'

1
answer

Difference between std :: list, std :: vector and std :: array

All containers used to guard data sequentially, but what are the main differences between them?     
asked by 04.11.2016 / 17:30
1
answer

Why iteration of a list with anonymous object works with array but does not work with ListObject?

I tried the following iteration with C #: var objects = List<Object>{ new {Id = 2, Nome = "Wallace"}, new {Id = 4, Nome = "Cigano"} }; foreach (var user in objects) { Console.WriteLine ("Meu id é {0}"...
asked by 14.06.2016 / 20:45
6
answers

How do I know which is the last element in a list?

I am doing a dynamic sql query, in which I use lists, my problem is, how to know which last element of this list Follow the code you have made so far: List<string> campos = new List<string>(); campos.Add("id"); campos.Add("desc...
asked by 25.06.2015 / 15:42
2
answers

How to determine the last element of a list in a foreach?

Given any list, how do I know if foreach is in the last element? There are a few ways to do this, the most I can see is to save the last element and check if the current element is the same, but in that way it is necessary to check eve...
asked by 30.06.2016 / 16:07
3
answers

Update an element of a generic list by a specific item

How do I update a specific element of a generic list by locating by ID and passing an updated object in its place, updating the name and email? class Program { static void Main(string[] args) { List<Aluno> aluno = new Lis...
asked by 16.09.2015 / 21:48
3
answers

How can I restructure information contained in a list object in two columns?

Considering a list x consisting of% with% vectors. To illustrate the problem I have thought that it has 3 elements, as follows: >x $'2751006' [1] 106.2 75.4 65.4 87.4 76.8 196.4 74.2 $'2751007' [1] 73.9 110.1 101.3 $'2752006'...
asked by 04.01.2016 / 20:30
2
answers

How do I get a random string from a list of strings?

Code: nomes = new string[5]; nomes[0] = "José"; nomes[1] = "Carlos"; nomes[2] = "João"; nomes[3] = "Miriam"; nomes[4] = "Estela"; I put an array, but it does not have to be array, it can be with list or something else that gets fas...
asked by 30.05.2014 / 15:46
1
answer

What maximum number of items can I put inside a ListT in C #?

I have several performance doubts in my application. What is the maximum number of items that I can get within my List<T> and what is "acceptable" within good practices.     
asked by 01.08.2017 / 17:04
2
answers

In which scenario is it recommended to use KeyedCollection instead of a Dictionary?

I did not know of the existence of KeyedCollection until you see this #
asked by 27.03.2015 / 11:58
1
answer

Problem putting multiple data in a list in a report

Good morning guys, this is a somewhat complicated issue to explain, so I'll do my best to make the question clear. I have a <UnimedLote> list. In this list I have several data, among these data there are some that I want to list more t...
asked by 19.05.2015 / 14:42