Questions tagged as '.net'

2
answers

Save values in Hashtable

When I save the value of this Hastable it gives me error. Follow the code: Hashtable ht = new Hashtable(); ht.Add("index", index); ht.Add("tipo", "1"); string tipo = ht["tipo"];     
asked by 09.06.2016 / 16:58
2
answers

How do I get properties of a type when I use Generics C #

I have the following class: public class Pessoa { public int id { get; set; } public string Nome { get; set; } public DateTime DataNascimento { get; set; } } I've developed a method to get the properties of it, but I can not use...
asked by 11.05.2017 / 16:32
2
answers

How to exit a cycle in C #?

I need to exit foreach when the value is equal to 1 foreach (DataGridViewRow dr in dgvValetes) if(dr.Cells["valor"].toString()=="1") //Sair aqui I do not know how to do ...     
asked by 16.06.2016 / 12:36
2
answers

Difference between ADO.NET and Dapper

What are the differences between the ORM's? When to use one and when to use the other? What are the disadvantages of each?     
asked by 19.07.2018 / 02:32
2
answers

Can Hashes be different for the same bytes?

I found a flaw or I'm not sure how to deal with hashes . I have two random arrays , one generated by one algorithm and one original. I'm trying to make the algorithm look EXACTLY the same as the original. I visually managed, with the same byte...
asked by 13.01.2018 / 05:27
4
answers

OrderBy in T lists

I have a list list<Pessoas> : My class people: public class Pessoas { public String Nome { get; set; } public DateTime Nascimento { get; set; } } Theoretically, I could make a OrderBy like this: Pessoas.Order...
asked by 31.03.2015 / 19:13
2
answers

How do I close / close a msgbox via code?

I tried to find out how I could do this, but I did not find anything clear. I want to know if it is possible to close the first msgbox , just after 2 seconds . Follow the Code: MsgBox("Iniciando Conexão Com a Impressora Fiscal", MsgB...
asked by 16.02.2015 / 12:54
3
answers

Error in controller ViewData

What could be wrong with this example? I can not do this: var pessoa = new Pessoa ( PessoaId = 1, Nome = "teste teste", twitter = "@teste" ); Error message:    'Name' does not exis...
asked by 30.09.2014 / 16:48
3
answers

Console, WindowsForm or MVC which is the fastest for heavy loads?

I'm developing a program that will basically have the following cycle: Query in the database (some milliseconds) For each record, you will execute the following process: Início | Parse de um XML web (alguns milisegundos pra executar) |...
asked by 08.10.2016 / 02:13
2
answers

Is it necessary to open and close a connection when entering data?

In% insert% in an Excel spreadsheet is it necessary to open and close the connection? I have analyzed the following, depending on how much logging can take up to 1h30 to make *loop* que faz .    Example : The procedure returned 44...
asked by 11.10.2017 / 15:09