Questions tagged as '.net'

1
answer

Access object of a method executed by thread in the background in C # with WinForms

I created a thread to execute a process that takes a lot of time and makes the application process stop for a very long time private void ExeConsultaClientes() { thread = new Thread(new ThreadStart(ExeConsultaClientesst));...
asked by 09.03.2018 / 15:02
1
answer

Method Math.Round does not round correctly

I'm having problems with the Math.Round() method in C #, some values that it does not round properly, I'll give some examples: Math.Round(1190.245, 2) 1190.245 it should round to 1190.25 since it ends with 5 and the 5 i...
asked by 06.02.2018 / 20:29
1
answer

Performance ItextSharp

I am doing the reports using iTextsharp and the result has been acceptable, however when working with many records it has become slow. Currently I do this: I get the bank data (storing in DataTable ); In a foreach concatenate...
asked by 16.12.2017 / 14:32
2
answers

Go through a list of characters

I have a method that checks the amount of characters in a string , and separates them into variables with the information as it can be seen in this example . The problem is when you have a list of data in string . This data will always...
asked by 13.03.2015 / 18:15
1
answer

Is it possible to omit the numbers of the formatting arguments of "String.Format" in C #?

I was seeing that in Python it is possible to format an unnumbered string the arguments . Example: #mensagem = "Meu nome é {0} e minha idade é {1}"; mensagem = "Meu nome é {} e minha idade é {}".format("Wallace", 27) print(mensagem);...
asked by 06.12.2017 / 15:29
1
answer

Use Contains in an integer field in C # with lambda or LINQ

I have the following expression: query = query.Where(x => x.MeuCampoInteiro.ToString().Contains(filter)); But an exception is occurring: System.NotSupportedException: 'The expression [10008].MeuCampoInteiro.ToString() is not supporte...
asked by 27.09.2017 / 16:43
1
answer

How to create an ArrayList of arrays?

I'm having some problems creating a List of Arrays, I'm using Visual C #, .NET 3.5. Code: using Database; //... namespace Sample { public partial class Form1 : Form { //... private void Button1_Click(object sender, Event...
asked by 23.04.2014 / 03:19
1
answer

How to make the keydown function work with the program in the background?

Code: if (e.KeyCode == Keys.F7) { A1 = !A1; } How to make this code work without the program being in the foreground?     
asked by 18.02.2017 / 17:15
2
answers

TimeSpan time difference in 24hr format

I am asking this question because I have not located any topic with my problem, which is very similar to others. I have 2 fields TimeSpan? with one referring to the entry time and the other to the exit time . I want to know the t...
asked by 07.02.2017 / 14:56
2
answers

What is ASP.NET Core Blazor?

Looking at the list of news that is in Visual Studio, I came across something talking about ASP.NET Core Blazor, and apparently has almost nothing talking about, I found very little material, and in English, but even using the translator was ver...
asked by 04.04.2018 / 05:01