Posts by Butzke • 579 points
12 posts
-
1
votes2
answers91
viewsA: Debugging error in Visualstudio 2013
Right-click on your project and click on Properties to open the project properties. Select the tab on the left Debug At the bottom in Enable Debuggers check the option Enable Native code debugging…
-
1
votes3
answers903
viewsA: How to apply String formatting in Datagrid - WPF
Can you apply the Stringformat to Binding in this way: <DataGrid Name="dtgTeste" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn Header="CPF" Binding="{Binding…
-
1
votes3
answers3527
viewsA: Swap characters inside a string, in a string
The characters " in the middle of the string are not accepted as in the question. To add a " in the middle of a string should be: replace by \" add @ at the beginning of the string and replace with…
-
4
votes2
answers92
viewsA: How to make a method to write to the variable in which it extends?
What you can do is just deny the variable. bool toggle = true; toggle != toggle; // toggle = false toggle != toggle // toggle = true
-
3
votes2
answers8188
viewsA: Read specific text inside a . txt in c#
Follow the code to always search for the third value (separated by whitespace) of each line, and add to a list valoresEncontrados. List<string> valoresEncontrados = new List<string>();…
-
8
votes2
answers3644
viewsA: What is the use of using?
The instruction using ensures that the Dispose be called, even when an exception occurs while you are calling methods on the object. You can get the same result by placing the object in a Try block…
-
1
votes2
answers479
viewsA: Adding checkbox to datagrid lines
You can add a Template column of a checkbox in each row instead of just the name, for this the property of your object being added to the Datagrid should be a boolean. <DataGrid…
-
0
votes1
answer371
viewsA: WPF - Hide Components in Design
Have you tried using the Visibility.Collapsed? Hidden will not show the element, but will reserve the space for it. The exact text according to the MSDN: Visible: Shows the widget. Hidden: Does not…
-
7
votes3
answers546
viewsQ: Run program inside Try/Catch
Working with Visual Studio, when an error occurs while the program is running the program hangs and you can’t see where the program crashed and only appeared that error screen. To catch where these…
-
4
votes1
answer1464
viewsA: Send CR LF via Serial port c#
To send the CR (Carriage Return) and LF (Line Feed) commands together with the command would just add the commands \r and \n at the end of the command within the method to send a command through the…
-
2
votes1
answer1464
viewsQ: Send CR LF via Serial port c#
I’m communicating by Serial (SerialPort) with a device that requires me to send commands CR LF at the end of each instruction for the device to understand that an instruction has been sent to it.…
-
13
votes1
answer300
viewsQ: Control the fan (fan) of the CPU in C#
How do I read and set the fan speed (fan) of the CPU and also read the current speed? I tried to use this code but also could not get result. [DllImport("Cimwin32.dll")] static extern uint32…