I was working on a project and unintentionally ran into the semicolon that ended up being inserted well after a if . I was intrigued because Visual Studio did not point as an error, and when trying to compile the project I was successful....
I need to create a C # executable and I have the doubts: Do with thread or do with task ?
In practice is there any difference between using Task and the "traditional" multi-thread ??
Is it true that a task...
How can I compile a string inside C #?
Example: Console.WriteLine(\"Hello World\"); .
As if it were a eval of JavaScript?
I had a project to load a code into a text file or something else.
In .NET you can see the multiple ways to initialize a string with an empty value, commonly known as "double quote".
Is there a proper way to do this? And what would be the practical difference between using:
var nome = String.Empty;...
I often see terms like LINQ query and lambda expressions .
Then the question came up, What I'm doing is a LINQ query, a lambda expression, or both?
Ex1:
var query = Produtos.Where(p => p.Descr.StartsWith("A")).Take(10);
Ex2:
var...
I have the following value:
43239.110000000001
I used this command:
txtSomatorio.Text = String.Format( "{0:#.#,##}", somatorio);
I achieved this:
43239,11
How do I display it like this?
43.239,11
Although I am aware of what would be best to use, I ask this question for teaching purposes since I see several examples of people using double in C #. But I've had problems with double for coin calculations and read in several pla...
The type short corresponds to a 16-bit integer - it is literally syntactic sugar for type Int16 .
Current processors are all 64 bits, even on most low-end machines. Some older machines still have processors with 32-bit architectu...
I passed a string as a parameter. From what I know it is passed by reference, so if I change anything in it within the method, when I leave it the value will continue to change.
I did the test below and it did not happen what I expected. Am...