Questions tagged as 'c#'

3
answers

Add table values

I have a table where I return the amounts paid per taxpayer monthly. But I need to create a subtotal field, adding up the values for each month. Much like the Fibonacci Sequence. The problem is that I need to look up to when the taxpayer made th...
asked by 05.03.2015 / 14:20
6
answers

Part of Label in Bold?

How to put a part of string of a Label into Windows Form in bold via code in c# . Does anyone know anything via code for this?     
asked by 12.02.2014 / 20:22
1
answer

Add () method does not add TimeSpan to DateTime

I created a DateTime with some values started in the constructor, but when I add a TimeSpan with some values, it does not add together with the date. I'm using the DateTime method to add a TimeSpan, but it's not working because the time is se...
asked by 05.07.2017 / 15:51
1
answer

How to format DateTime in C #?

I know two ways to format a date in C# : data.ToShortDateString which gives me a return like this: 07/21/2017 data.ToLongDateString that gives me a return like this: Friday, July 21, 2017 I want a format similar to...
asked by 21.07.2017 / 21:08
2
answers

Loop is not repeating as it should

I am creating a code that reads the number entered by the user and, if it is from 1 to 10, he / she performs the table, presenting value by value on the screen, and allows the user to choose whether to check another table. The first time, it...
asked by 14.07.2017 / 19:51
1
answer

Connecting to the database with App.config

How to establish a connection to the Northwind database using App.config and ADO.Net?     
asked by 27.06.2014 / 02:48
1
answer

How to declare an integer variable in C #?

I'm learning C # to migrate a system in VBA to C #. I'm really enjoying the .Net language. How do I declare a variable of integer type?     
asked by 30.06.2016 / 23:41
3
answers

Change read-only property in the class itself

A read-only property implements only the get accessor. But what if I want to modify this property in the class itself? Let's say public class MinhaClasse { public string PropriedadeDeMinhaClasse { get; } private void UmMetodoPr...
asked by 30.06.2016 / 22:45
1
answer

How to create a variable accessible in all forms?

In my application you will have a Login system. I want to create a variable to store the id of the user that is logged in, and that it can be accessed on all other forms. I need this because in my database, each table has a field called us...
asked by 05.01.2017 / 20:11
2
answers

Changing opacity of one form through another

I need to change the opacity of the main form every time the user clicks the close button. When it clicks on this button the opacity stays in this.Opacity = .75; and opens a new form asking if it wants to close the program. Close butto...
asked by 03.01.2017 / 14:07