Questions tagged as 'c#'

2
answers

Resolve error Value of 'X' is not valid for 'SelectedIndex', where X is any Index value

Hello. I asked a question days ago about capturing the value of a cell from a gridview to a Form leg% and sending it to a combobox in the Form primary. I received a satisfactory response and that causes the Form prima...
asked by 08.06.2017 / 02:22
1
answer

Can I store hash code in a database?

I was reading some questions here and a question came up on one of those questions . If I have an application I need to store strings in a database to compare later with something, but I do not need the texts, just need to know if they are t...
asked by 08.08.2017 / 14:35
1
answer

Declare textbox event in XAML

How do I declare the KeyPressEventArgs event of a textbox to work with this event in Code Behind? The code to run the event I have, I just can not declare the event, as I do with the Click, for example. This one I can. I found that for keypress,...
asked by 09.08.2017 / 21:39
2
answers

Use ProgressBar to copy folders and their contents

I have an application in C # WinForms that when clicking a button, should start copying various folders and their contents. Since this process is time-consuming, I'd like the user to know how the progress of the process goes through Progre...
asked by 23.03.2017 / 19:02
3
answers

Contains within a list

I have a List of Assets that contains a list of Accessories I would like to filter all the Assets that the accessories (ID_ACESSORIES) are inside an int list. Follow the code; //Lista com todos os ID_ACESSORIOS que tenho que filtrar List...
asked by 08.03.2017 / 17:49
1
answer

Variable interfering with the value of another variable

Good afternoon Srs. I'm facing a problem I've never seen before, below I have a view mapped in EF with fluent var viewRelatorio = db.view.where(ra.DataBruta.Month == mesAno.Month).toList(); I have two dictionaries that will interact wi...
asked by 07.02.2017 / 18:57
1
answer

Migration generated empty after Scaffolding

I'm studying ASP.NET MVC5, so I created a model called RelatorioTagModels : public class RelatorioTagModels { [Key] public int TagID { get; set; } [Required] public decimal Tag { get; set; } [Required] public de...
asked by 16.02.2017 / 15:53
1
answer

C # timer [duplicate]

I'm programming the screen of a game where it will show the score of the player in progressive mode, it shows the score at the end of the match but does not show with the effect of time between the numbers. my while is wrong? int n = 0; whil...
asked by 21.07.2017 / 15:58
1
answer

Save the bytes of a file

I'm doing an application that needs to read the bytes of a fixed file, I'm able to read clearly, however, it bothers me that the file needs to keep track of my application every time it starts. By any chance do you have to 'save' these bytes ins...
asked by 17.07.2017 / 09:12
2
answers

I can not get a variable from another namespace

One project is WebApplication and the other is a Console : "Test Project" SolutionName Structure below: Business (Folder) BusinessDAL (project) DLL.cs file Console (project) Business.cs // BusinessDAL Project...
asked by 04.08.2017 / 15:50