Questions tagged as 'c#'

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

How do I use Skip and Take with the PagedList Helper

I would like to paginate, but using Skip and Take in my LINQ not to fetch all results. Currently my code looks like this: public ViewResult Index(int? page) { var grupos= from s in db.grupos...
asked by 20.08.2014 / 19:23
2
answers

How can I create a CheckBox using the Html.CheckBoxFor Helper for a Nullable field?

My field is as follows in my class: public bool? meuCampo { get; set; } And in my view it looks like this: @Html.CheckBoxFor(m => m.meuCampo) But this way it is not allowed, because I can not explicitly convert type bool? to...
asked by 09.05.2016 / 18:10
2
answers

How to convert CamelCase to snake_case in C #?

I would like to know how to convert a string with CamelCase to snake_case into C #. For example: EuAmoCsharp => eu_amo_csharp SnakeCase => snake_case     
asked by 04.07.2016 / 18:29
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
2
answers

How to fix this error "Can not convert from 'int' to 'char []'

Why is this error displayed? I believe the logic is right.     
asked by 07.10.2017 / 23:04