Questions tagged as '.net'

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

Report progress for interface of an asynchronous method in C #

I have a Windows Forms application. This application will run some processes that take a while to run, so I would like to run them in parallel. Here's a little of what I'm trying to implement. In the form constructor, I create a generi...
asked by 09.09.2014 / 19:53
2
answers

HTML element within an ActionLink

Hello, I would like to know if you can create an HTML element within a ActionLink , for example: To create a link on a menu with ActionLink : @Html.ActionLink("Classificação Financeira", "Index", "ClassificacaoFinanceira") Bu...
asked by 06.10.2015 / 16:34
1
answer

Why can not I display the MessageBoxButtons if it is not a string?

Why am I not able to display MessageBoxButtons if it is not a string? static void Main() { string texto = "Minha primeira MessageBox"; MessageBoxButtons botao = MessageBoxButtons.OKCancel; DialogResult result; result = M...
asked by 20.11.2015 / 01:15
3
answers

Run Python and C # together

How can I in C # import, that is, execute some script in another language (Python)? Example: If you write "R" in a program in C #, it executes a file named ApertouR.py .     
asked by 27.12.2017 / 13:59