Questions tagged as 'c#'

2
answers

How do I get the value of a ListBox from the selected index of another ListBox?

I'm trying to get the value of a ListBox from the selected index of another ListBox , but it does not work. What I have until the present moment: for (int i = 0; i < 10; i++) { Lst_ListBoxA.Add(2 * (3 * i) * 4); Lst_Lis...
asked by 26.05.2014 / 02:07
1
answer

Is it possible to leave the summary in Portuguese?

Is it possible to leave in Portuguese the <summary> hints of existing methods in .NET or third-party components in Visual Studio?     
asked by 20.08.2014 / 17:57
2
answers

Code Abstraction

I am creating a question and answer project, more to consolidate my knowledge and acquire others. But in developing it I came up with an issue that I am thinking of which of the options would be best to create a model and consequently a table cl...
asked by 10.08.2014 / 03:38
3
answers

Search for word in the first array column [closed]

How do I search for a word in all rows, but only in the first column of an array that will always increase in size? string[,] array = new string[1,6]{{"texto","","","","",""}}; if(array[array.Length, 0].Contains("texto")){...
asked by 17.10.2016 / 00:26
2
answers

Query with Datetime Sql and C #

I'm trying to get the patient back to me for a certain day and time in the following command: SqlCommand cmdSelect = new SqlCommand("select DISTINCT P.nome,P.codPaciente, M.codMedico, C.descricao from Consulta as C " + ", Medico as M, Pacient...
asked by 15.11.2018 / 21:19
1
answer

InvalidCastException: Unable to cast object of type 'System.Security.Cryptography.RSACng'

I'm trying to pass the PIN through the code, so the user does not have to type it all the time, he's returning this error:   InvalidCastException: Unable to cast object of type 'System.Security.Cryptography.RSACng' This is the function I'...
asked by 30.11.2018 / 18:28
1
answer

Self-relationship in EF6

I need to do a self-relationship in one of the entities, how do I reference the entity itself for both child records and the parent record? public class Comentario { public int IdComentario { get; set; } public int? IdComentarioPai { g...
asked by 10.04.2014 / 15:10
1
answer

How to pass values in an Action Link that are in HTML elements?

I have 2 HTML elements, a TextBox and a Hidden , which have values, how do I pass the values of these elements to the Action link in the Action link? Below the parameters docItemId and vlrImobIcms are giving error. &...
asked by 18.02.2014 / 13:58
2
answers

How to transform a method into a class?

I have the following in a form: public form1() { InitializeComponent(); this.FormClosing += new FormClosingEventHandler(this.confirmarFechamento_FormClosing); } private void confirmarFechamento_FormClosing(object sender, FormClosingEve...
asked by 21.03.2014 / 05:23
2
answers

Automato for navigation in a WebForms application

Dear, it was not the first time nor last time that I needed to implement an automatic routine that accesses a Web site or system created in the WebForms platform to capture information. It has been extremely costly to make any form of automat...
asked by 04.04.2014 / 20:34