Questions tagged as 'c#'

1
answer

Select with LIKE with argument%

I'm trying to make a select, using LIKE and setting the argument%:    WHERE title LIKE '% computer%' finds all book titles with the word 'computer' anywhere in the book title. source: link However, when I run the direct comman...
asked by 14.08.2016 / 16:02
1
answer

UserControl, what is it? When to use?

I am studying how to best control users in a WPF application, but I have some doubts about UserControl available in VS 2015. I have already programmed an access control, ie user and login , user registration and etc., but now I need t...
asked by 08.08.2016 / 20:08
2
answers

Lambda, Where with subquery

I need a query like this in lambda SELECT ClienteId --Aqui eu tenho varios campos do Cliente e estagioprocesso FROM Cliente WHERE ((SELECT TOP (1) EP FROM estagioprocesso...
asked by 03.02.2016 / 18:24
2
answers

dataGridView1_CellDoubleClick does not work!

I have the simplest function in the world and I can not make it work. When giving 2 clicks on any cell in my datagridview I want it to display the message "1" but it is not working! What's wrong? See my code: private void dataGridView1_...
asked by 16.06.2016 / 01:27
2
answers

How to disable a button, and to activate it, should you click on another button?

I created a calculator using Windows Forms, it ran perfectly, but when I click the operation button before the number button (to enter a value on the display) an error occurs that closes my program alone. I wanted to know how I can do so that th...
asked by 03.06.2016 / 00:53
1
answer

Find item in a List with Contains method

I have an object of type Data, which has the attributes name (string) and transacaBloqueio (int). I have a Data List called SharedBlock data. I want to check if this list has an item already with the same name and same transaction as the last on...
asked by 27.05.2016 / 17:54
2
answers

Differences between syntaxes of namespaces [closed]

I know two ways to declare a namespace: // Comum namespace Example\Class\Method; class ExampleClass {...} // Outro, similar a sintaxe C# (classe dentro do namespace) namespace Example\Class\Method { class ExampleClass {...} } Is there...
asked by 29.06.2016 / 17:10
1
answer

Calculate square root in C #

I have a calculator made in WPF C # with the basic operations +, -, *, /,%. And now I wanted to try to improve my calculator. namespace calculadora { public delegate float? dlgoperacao(float? a, float? b); public partial class MainWindow :...
asked by 23.06.2016 / 13:29
2
answers

Create textboxes at runtime

I have a project that basically is a program that calculates the electricity consumption of various equipment that I am creating in VS2013. The problem is that since I do not want to put just one piece of equipment or a limited quantity, I wa...
asked by 27.06.2016 / 18:11
2
answers

FileDialog doubt c #

Well, I have the following code in my program: CODE private void button1_Click(object sender, EventArgs e) { openFileDialog1.Filter = "Ficheiro de Configuração (*.cnf)|*.cnf|Ficheiro de Request (*.csr)|*.csr"; DialogR...
asked by 19.05.2015 / 16:35