Questions tagged as 'c#'

1
answer

Help with RGB color in 16bit Hexadecimal

So, I'm creating an editor for a PS2 football game in C #. And the "color system" of the game is RGB, and so far everything was going very well, because I was encountering with "normal" Hex codes in the game how to choose the color R: 255 G: 255...
asked by 03.04.2017 / 21:20
2
answers

How to save changeable parameters in the system?

I have an ASP.NET MVC project and I use web.config to save some parameters that will be used by the system, but should not be changed by any users. Now I have to implement some other parameters that can be changed by users, without ha...
asked by 09.11.2017 / 20:37
1
answer

What tools to optimize C # code? [closed]

Code optimizer tools aim, for example: - Code Removal: removes any class code, attribute, or dead method that is not referenced and used in the project. - Rewrite and reduce functions: rename as much as possible to further increase mem...
asked by 16.11.2017 / 16:57
2
answers

What does a "Thread Safety" class mean?

According to MSDN a WebApp Class (Microsoft.Owin.Hosting) is Thread Safety . What does this mean exactly? This class specifically has a method Start that:    Start a web app .... Would every request to this app...
asked by 26.07.2015 / 22:18
2
answers

Ternary Operator C # [duplicate]

I would like to add one more condition in my ternary operator. Is it possible for more than two conditions? Or is there another possibility? I need to insert the ProductCatalogDigital property, which is of the BasicLongDTO type. Currentl...
asked by 22.02.2018 / 20:31
4
answers

What is the best solution? GetById with id not existing in DB

I'm making a call in my repository but the CPF does not always exist in the DB. When it does not exist in the database I get the following error. Repository public VendedorModel GetById(int CPF) { using (var db = new Pow...
asked by 12.01.2018 / 12:32
1
answer

Conversion of date string to datetime C #

I have a method that will receive a string in the format "June 15, 2001", for example, which is equivalent to the date to be compared, I need to pass this string to a DateTime, how would I do this conversion?     
asked by 09.06.2015 / 16:08
1
answer

My project does not open anymore

My project was working perfectly. I opened it now and it gives me this error: When I got my grandson I was with my notebook, but I do not think he (3 years) would damage it. It is more certain to be a virus, but I scanned it and did not g...
asked by 21.05.2015 / 21:22
3
answers

One button code to undo an action in C #

Hello, I am developing Bingo software for the Church that I attend. Whenyoupressanynumberbutton,itwillappearinthePictureBoxontheside.Asthefollowingimageshows. Now,noticethatthereisthe
asked by 25.07.2015 / 20:55
2
answers

Get parameters passed by url on another page

I have this call to another page, passing 2 parameters. Response.Redirect("/frmPVFichaCadastral.aspx?CdProcesso=" + vhdfCdProcesso.Value + "&CdTipoUsuario=" + vhdfCdTipoUsuario.Value) How do I get these parameters passed here on this pa...
asked by 20.11.2014 / 19:24