Questions tagged as 'c#'

5
answers

It is good practice to use 'return' functions or 'void' methods

Question taken to answer a comment , so that it can be better understood, and because I think it can be an interesting and useful question for other users who may wonder the same thing. Regarding the returns I know that being void function...
asked by 13.05.2017 / 22:47
3
answers

Transform document docx to html

I have a document docx already saved in bytes[] and I need to pass it to html to be able to display it on a page. I'm using Visual Studio with .NET to develop it in C #. Currently I already work from pdf that is easy to trans...
asked by 30.06.2016 / 16:57
2
answers

Problem with AutoPersistenceModel FluentNHibernate C #

I have a problem with FluentNHibernate so I can use Auto Persistence Model , sorry if I do not spell the words correctly techniques. This is the structure of my project. I always used all the entities in the base in the data...
asked by 16.01.2017 / 20:21
0
answers

Sequence of request body exhausted in ios safari

I am working on a system developed in asp , which has the authentication of
asked by 10.05.2016 / 19:52
1
answer

Why can not I close the window when I validate TextBox with ErrorProvider in C #?

I'm doing validations in C # with ErrorProvider. Validations are about TextBox . //Llama al método valida para decidir si el TextBox está vacío. private void textBox1_Validating(object sender, CancelEventArgs e) { valida(sende...
asked by 21.02.2018 / 15:31
2
answers

String.format vs. StringBuilder vs. String.Concat vs string + string

I'm doing a log in .Net which before and after each process will be filled string with the message: "proceso x realizado \n" "proceso y saltado \n" //porque o se realiza x o y "proceso a fallo al sumar \n" "proceso n [...] \n"...
asked by 24.02.2017 / 00:40
3
answers

Subtract two dates in c #

How can I subtract two dates in C #? I have two DateTime variables and I wanted to return the result in hours of them. DateTime fecharegistro = {04/05/2018 8:34:01} //obtenemos este valor de una bbdd DateTime fechafin = DateTime.Now.Substra...
asked by 07.05.2018 / 16:06
2
answers

Best search algorithm in C #

I was wondering if anyone knows what kind of methods are the most efficient to implement in very intensive searches (arrays) (I speak of arrays of millions of elements) from C #, for example it is better to use IndexOf or BinarySearch to obtain...
asked by 01.09.2016 / 03:44
3
answers

static? What is it? and what is it for?

I have been programming desktop applications for a short time in C # , and I do not understand the difference between using static in my created variables or functions, that is: private static String nombre_variable{get;set} // cual es la d...
asked by 03.04.2018 / 21:25
3
answers

Problem of Types DateTime C # + sqlserver

Good morning, I have the following problem. In a sqlserver database, I have an entity with datetime fields, I generated 2 new date fields and updated my model from the database. The fields were imported without problems, I add them to the corres...
asked by 05.06.2017 / 19:50