I have a WPF application and am looking for the best way to solve unhandled exceptions. Today, when an unexpected exception occurs, deal in event Application.DispatcherUnhandledException . There, I write the Exception.StackTrace...
What would be the converted SQL query for LINQ:
"SELECT SUM(valor_negocio) valor_negocio, " +
" MONTHNAME(STR_TO_DATE(MONTH(data_inicio), '%m')) mes," +
" STATUS" +
" FROM negocio" +
" WHERE data_inicio BETWEE...
I need to round numbers in such a way that they have only one decimal place worth 0 or 5.
For example
1 -> 1
1.1 -> 1.5
1.4 -> 1.5
1.5 -> 1.5
1.6 -> 2
2 -> 2
Does anyone know of a simple way to do this?
I see a lot of people saying it's wrong to switch in the code because it ends up weighing and it's ugly.
Is it correct the way I'm using it and what would be an alternative to using it? Fill in the code for if / else ?...
Is it possible to use the property of an object as an index of an array , as described in the example below?
using System;
public class Program
{
public static void Main()
{
var myObjectArray = new MyObject[]{
new...
I need to receive these pairs of data from the database, and I'm thinking of a way to bring the values without having to create an object, as I find it unnecessary in this case.
Is it possible to create a list<string,string>...
I made the following calculations on the calculator:
arctg(50/10) = 78,69°
However, when doing in code, using the function Math.Atan , the result is as follows:
Is there any other way to do the Tangent Arch calculation?
I'm doing a hangman game, let's suppose I type the name "john" in a text box, shortly after I press a button and I want it in the "text 2" box to appear " _ _ _ _ ", then I want the same number of underlines to appear as the number of letters....
As I already know there is overload in creating the methods, which are example, a method where you have the option of passing 2 or 3 parameters calling the same function:
//Soma 2 numeros
public int Somar(int a, int b)
{
return a + b;...