Questions tagged as 'c#'

3
answers

How to check if a specific value exists (string) in a list in C #?

I'm trying to set up an input select multiple and leave checked the options that are already present in a certain list. I'm a beginner in C # so the logic of what I need would be something like this: (Note that I'm using Razor) Sorry for...
asked by 14.02.2014 / 14:56
1
answer

How to get the publishing version of a console application

I'm having a problem trying to get the publish version of my application, I searched and found the following answer in SOEN how to show publish version in a textbox? I followed exactly the concept of the right answer, but an exception is th...
asked by 28.05.2014 / 19:01
2
answers

Code First with Complex Types, when doing Scaffolding Complex Types properties are not found in the views

I'm following the presentation of Sergey Barskiy in link , where he demonstrates the approach of Entity FrameWork with Code First. I loved it, but I had a problem. In the presentation, it demonstrates that I can use Complex Types for the...
asked by 04.02.2014 / 15:30
1
answer

Create an extension for visual studio that dynamically adds classes

I'm creating an extension for visual studio that aims to create a project based on the options the programmer wants. In this case a wizard will be created where it will choose the entity (s) you want to create, and based on this selection will c...
asked by 13.07.2018 / 16:59
2
answers

SHA512 return in hexadecimal

I found an example of encrypting a string with SHA512. public static string HashedString(string text) { SHA512Managed sha512 = new SHA512Managed(); byte[] hash = sha512.ComputeHash(Encoding.UTF8.GetBytes(text)); StringBuilder res...
asked by 06.09.2018 / 21:44
2
answers

Adding values from a column in the database using date filter

I need to sum all the values of a column containing in each row a specific date, that is, in the database, the values are saved with the date entered in textBox in the act of the cadastre, and I must add all the values column quantidad...
asked by 28.12.2018 / 13:00
1
answer

How to make blur effect on button?

Is there any way to 'blur' an image button using C # (Windows Forms)? I know this is possible with WPF, but I can not change that now. If it is not possible, is there anything that gives me a similar result?     
asked by 05.01.2015 / 22:50
1
answer

Entity Framework auto relationship enable cascading delete

How to create a cascading deletion in a self-relationship using fluent api and enable it in entity framework ? Code: Public class Usuario { public int UsuarioID { get; set; } public int? ObjPaiID { get; set; } pub...
asked by 22.01.2015 / 16:22
1
answer

Difference between Thread.Sleep and Task.Delay

I'm developing client / server communication, and using Task for asynchronous communication. Previously, I had already made another communication where I used Thread , works without problems and consumes little processing. In...
asked by 07.12.2017 / 20:08
1
answer

EFD-Reinf: Invalid signature - Failed to verify XML document signature (using C #)

Good afternoon, has anyone managed to sign the EFD-Reinf event using C #? I am sending the signed event and it is returning the following occurrence: { <?xml version=""1.0"" encoding=""utf-8""?> <dadosRegistroOcorrenciaEvento>...
asked by 22.12.2017 / 17:57