Questions tagged as 'c#'

1
answer

LEFT JOIN using Linq

I have the following tables: Responsavel | Filho Id Nome | Id Nome ResponsavelId 1 Ana | 1 Aninha 1 2 Maria | 2 Ana Júlia 1 3...
asked by 04.08.2015 / 18:52
2
answers

Questions to ask about delegates

I have not yet fully absorbed the use of delegates, at what point I really should use a delegate and why it's built. So I ask the community the following question. What is really a delegate? That is the question and it requires a single answer....
asked by 11.06.2015 / 14:46
3
answers

Return Time.zone.now in C #

In ruby on rails you have a command Time.zone.now that returns the date and time in that format = > Sun, 18 May 2008 14:30:44 EDT -04:00 I need to get this same time zone return only in C # Does anyone have an idea?     
asked by 26.06.2015 / 19:18
3
answers

Convert data to C #

Well folks I have a problem with my code. In my database I have a field of type date only that after calling it to the program it also passes me the time, it's something of the genre: 03-18-2015 00:00:00. What I wanted was just the part o...
asked by 18.07.2015 / 12:40
1
answer

Is it possible to show exception message in pt-BR?

I would like my exception message to be displayed in Portuguese, would anyone know how? catch (Exception ex) { Debug.Writeline(ex.Message); }     
asked by 07.08.2015 / 02:58
1
answer

How to convert string to double without rounding error?

Because the following command: Convert.ToDouble("199998,99") Results in:    199998.98999999999 Already the command: Convert.ToDouble("199998,98") Results in:    199998.98000000001 ?     
asked by 31.07.2015 / 14:47
4
answers

Limit number of characters per line

Is it possible to limit the number of characters per line of a% multiline% using Windows Forms C # and .Net 3.5?     
asked by 10.02.2014 / 11:50
1
answer

What is the difference between performance between different types of string concatenation?

I know 4 different types of concatenation of string in C #: // string Interpolation $"valor {variavel} R$"; // Verbating string @"texto qualquer pula a linha e continua o texto"; // concatenar 2 strings "texto" + "texto"; // string.form...
asked by 28.11.2018 / 21:49
1
answer

How to use methods contracts and why?

Reading a book on .NET development, I saw a brief description of methods contracts and tried to find out a bit more on the internet.    It uses an imperative syntax that is costly and has low tool support. To use the contract in the library...
asked by 05.12.2018 / 11:03
1
answer

How to do a Lambda sort with a List property?

I believe this has already been asked before. I researched but did not find it. I'm having trouble with this query, specifically on the ThenBy command that tries to sort the sub-list of objects. I know it's in it because when you comme...
asked by 21.10.2014 / 18:23