Questions tagged as 'c#'

1
answer

ArrayList: Is this right or does it have a better way to do it?

I know a little bit of java, but now I'm venturing into C #, but here's a question: In Java we instantiate an ArrayList like this: ArrayList<Tipo> nomeArray = new ArrayList<>(); We retrieved a value like this: nomeArray.get(1)...
asked by 30.09.2017 / 16:52
2
answers

Filling Label with Linq using ToList ()?

I have a table with the following schemas: GarantiaImovel | imovelID | GarantiasTipos 12 | 3 | Caução2 12 | 4 | Depósito 12 | 5 | Caução2 12 | 5 | Fiador 12...
asked by 16.08.2017 / 03:07
1
answer

Conversion from enum to string

Good afternoon! I have the following situation, as a return of a request I get a json with several information. In C # I convert this information to objects using JsonConvert.Deserialize () .. Look at the return below: { "id": "AV654AS65...
asked by 11.08.2017 / 20:36
2
answers

Selection of chekbox in datagridview

Good afternoon. I have a datagridview that populates through a select database, and in that datagrideviwer I have a column with a chekbox, to select the line I want to send to the impression, only this is happening the next, when I select the li...
asked by 27.07.2017 / 22:33
1
answer

Specify command for the CMD to open

I am doing a simple program with Visual Studio to execute some commands in CMD that I want, currently the program has only a simple screen and a button to open the cmd, but I would like to specify the command that the prompt should run. Eg: I...
asked by 25.07.2017 / 18:51
1
answer

How to put the background color in the cells of the first line using NPOI?

I'm using the NPOI library to be able to generate an Excel file. This is the first time I've been in touch with this library and would like help putting background color on the cells in the first row. My current code is this: using Syste...
asked by 20.07.2017 / 14:33
2
answers

Remove undisclosed user from the database

I need your help, I created two classes inside my Controller, where I can pull a user from one page and send it to another. As if you were deleting but not deleting from the database. I created a variable in my database called Removed wher...
asked by 14.06.2017 / 20:48
1
answer

Return Controller List to View

I have controller where I validate the information of ModelState , I store the errors in a list. I'd like to take this list and return it to my view. But I'm a beginner and I can not understand how I can do this, could I use...
asked by 09.06.2017 / 01:57
1
answer

Change existing column to Identity

Having an entity where the first key is an integer and is set to not be a Identity public class Teste { [Key] [DatabaseGenerated(DatabaseGeneratedOption.None)] public int Id { get; set; } public string Nome { get; set;...
asked by 07.08.2017 / 16:07
1
answer

Is there an equivalent to VB.Net Call in C #?

The question is simple. Is there a keyword equivalent to Call of Visual Basic .NET in C #? In Visual Basic, I called a method of a class without explicitly declaring a member for it: Call New Form() With {.Text = "Olá, mundo!"}.ShowD...
asked by 01.08.2017 / 05:25