Questions tagged as 'c#'

3
answers

How to create a custom list using data from four tables?

I have the following class: Nota { int id; int idFornecedor; int idProduto; int idClasse; } and I have the respective classes referring to the ids of the previous class: Fornecedor { int id; string descricao; } Pr...
asked by 11.04.2017 / 13:01
5
answers

Get object in array by description in index

Is it possible to use the property of an object as an index of an array , as described in the example below? using System; public class Program { public static void Main() { var myObjectArray = new MyObject[]{ new...
asked by 24.11.2017 / 12:53
2
answers

ReportViewer Generic error GDI +

In ReportViewer, some generated requests are generating exception, and when this occurs, I can not even export to PDF, but for DOC it works. Does anyone know what's going on? I use C # with VS2010 and .Net 4.5 Description of exception :...
asked by 29.05.2014 / 00:40
2
answers

How to create a report with Crystal Reports parameters?

How to create a parameterized report in Crystal Reports? Creating the report for me has no problems, but now I need to filter it according to some parameters of the system table. Can anyone help me with some examples?     
asked by 15.04.2014 / 16:20
4
answers

Create list with more than one element as if it were multidimensional

I need to receive these pairs of data from the database, and I'm thinking of a way to bring the values without having to create an object, as I find it unnecessary in this case. Is it possible to create a list<string,string>...
asked by 13.08.2018 / 16:53
3
answers

Generate an xml in C # [closed]

I need to create an application where the data will be saved to a local xml and then sent to a server using a wcf. But I have the following doubt what I do in the client and what I do in the service (wcf). I'm new to this area and I have no idea...
asked by 03.05.2016 / 15:38
2
answers

Arc tangent function in C #

I made the following calculations on the calculator: arctg(50/10) = 78,69° However, when doing in code, using the function Math.Atan , the result is as follows: Is there any other way to do the Tangent Arch calculation?     
asked by 16.02.2017 / 20:16
3
answers

How to replace the number of letters of a word with a character?

I'm doing a hangman game, let's suppose I type the name "john" in a text box, shortly after I press a button and I want it in the "text 2" box to appear " _ _ _ _ ", then I want the same number of underlines to appear as the number of letters....
asked by 03.06.2017 / 20:40
2
answers

What code should be used to focus on a TextBox?

What code should be used to focus on a TextBox? I am creating a system, where it is necessary that when the client press ESC, the focus of the textBox is lost. How do I do it?     
asked by 03.07.2017 / 19:27
3
answers

Is it possible to offer return options in a method?

As I already know there is overload in creating the methods, which are example, a method where you have the option of passing 2 or 3 parameters calling the same function: //Soma 2 numeros public int Somar(int a, int b) { return a + b;...
asked by 14.08.2017 / 20:24