Questions tagged as 'c#'

1
answer

Enable a button after entering password

I need some help, but I do not know how to do this code. I have a form and in this form I have a button that deletes in a SQL table, I want to make the button disabled and to enable it I want to make the user type a password. Follow the co...
asked by 26.06.2017 / 16:55
3
answers

How do I activate confirm the form by enter? [closed]

I'm doing a C # program that plays within TextBox into Grid , but I'm only getting through a button. I want to know how do I for the provider user the first given, hit enter, skip for age, and after that hit enter again information...
asked by 26.07.2017 / 20:19
2
answers

Problem receiving char

Why the first time I pass a char value of the error (as if it were empty)? Then on the second try it works normal?    After I received the Initial of the Position or Turn of the error and even then I gave   a WriteLine was with the correc...
asked by 30.08.2017 / 20:42
1
answer

Show fk name on the grid

This is the select of my proc select f.id ,f.nome ,f.dataNascimento ,f.cpf ,f.cidade ,c.nome from funcionarios f inner join cidade c on f.cidade...
asked by 10.08.2018 / 15:25
1
answer

Location.href is not transferring from page in ASP.NET MVC

I'm doing a login screen in ASP.NET MVC. The framework makes all processes complete without errors: go to the database, query the login and return with an OK (user exists, I can authenticate). When the flow returns from the bank and passes throu...
asked by 18.08.2016 / 04:16
1
answer

Skype bot detects when you receive message [closed]

This is what I have been looking for as I can do a bot that responds when I receive a message from someone, I found a tutorial but I could not get the bot to respond even though the bot answered in the tutorial. This is the code I have for the...
asked by 27.08.2016 / 22:52
1
answer

How to detect the version of the Windows operating system?

I want to get a value of what system you're using, like: Windows 7 or Windows 8 or Windows 8.1 or Windows 10 How can I do this in C #? I've tried System.Environment.OSVersion does not work right. I tried this answe...
asked by 08.05.2018 / 02:05
1
answer

Error: The model item passed to the dictionary is of type X but this dictionary requires a model item of type Y

It is giving error when starting the query and in the generation of the list with the results: Error:    System.InvalidOperationException: The model item passed into the dictionary is of type 'System.Linq.Enumerable + WhereSelectEnumerable...
asked by 02.02.2018 / 20:27
1
answer

How to tell if foreach is traversing the last item in the list [duplicate]

I've created an application in console and a foreach to scroll through my list of integers: var lista = new List<int>() { 2, 6, 1, 4, 20, 21}; int count = 0; foreach (var item in lista) { count++; //if(???) //count =...
asked by 05.02.2018 / 14:16
1
answer

Problem accessing methods of the concrete class using this reference in C #

I implemented an abstract% class with Service and another using Generics being concrete. Every design structure for each concrete class has an abstract. My doubt seeing the following ... When using the reference Empresa...
asked by 11.05.2018 / 12:50