Questions tagged as 'c#'

2
answers

Tie "for" inside another "for" (nested repetition)

I would like to save these 9 lines repeated in my code: for (int n1 = 1, n2 = 1; n2 < 11;){ Console.Write(n1 + "x" + n2 + "=" + (n1 * n2) + "\t"); n1++;//1 Console.Write(n1 + "x" + n2 + "=" + (n1 * n2) + "\t"); n1++;//2 Console....
asked by 27.09.2017 / 03:39
1
answer

Signaling incoming messages

The customer has 7 stores and an array. Someone in the matrix with decision power, will keep your mobile in hand with an application. When an employee at one of the stores needs to approve a discount greater than what she can give, she then send...
asked by 21.08.2017 / 18:30
1
answer

How to get information from an App.config

I'm doing a program where I wanted the user to put in the variable the number they need because it will vary from computer to computer, which will be the number that needs it. I'm using the App.config for this but it's sending me to the blank re...
asked by 21.08.2017 / 17:57
1
answer

How do users' SIDs work?

I need to implement an authentication system written in C # .NET based on Windows users, so it will be authenticated according to some unique user identification p> The problem is that the only workable ID I've encountered that might repre...
asked by 20.09.2017 / 07:47
1
answer

How to work with DataGridViewCheckBox using a separate chekBox that allows to enable and disable all fields of DataGridView?

I'm having some difficulties in working with DataGridViewCheckBox using a chekBox aside, almost everything is working in normality, the problem is when using the select all option, which is the chekBox that I added the part, for example: w...
asked by 20.09.2017 / 13:27
1
answer

Visual Studio 2015 Build Alert

I'm developing a project in Windows Forms, and recently I upgraded from Visual Studio 2010 to 2015, but when I installed VS 2015, I noticed that there was no View, so I installed it to put it in my project as a form of reporting. Finally when...
asked by 19.09.2017 / 12:47
1
answer

How to handle a render exception in Windows Presentation Framework (WPF)

Randomly, my system causes this exception (which I only see because of the logs left in Windows events). It is an application that runs 24 hours a day every day. When the error occurs, the screen freezes and if I click anything, the program clos...
asked by 16.08.2017 / 13:41
3
answers

Removing items from a ComboBox

I have a Status that looks for 13 statuses of a table: cboStatus.DisplayMember = "nome"; cboStatus.ValueMember = "codigo"; cboStatus.DataSource = CartoesVTBLL.Status(); cboStatus.SelectedValue = ""; In this table I have the Constraint f...
asked by 16.08.2017 / 15:38
1
answer

Capture the query TraceSql in LINQ c #

I have a query in LINQ and I need to capture the generated sql, but I did not succeed. The conversion to ObjectQuery that I found does not work. What is missing? var sqlConsulta = (from a in Sessao.Query<RequisitorioNaoLevantado>()...
asked by 14.08.2017 / 22:01
1
answer

How to use line break in C #

I have a label and on this label I have a field that is very large. I need to break the line, to go to the bottom line when it reaches a certain number of characters. etqfracpic1.Add("Cas: " + reader[10].ToString()); // como estou passando...
asked by 14.08.2017 / 16:41