Questions tagged as 'c#'

2
answers

Array of bitmaps firing OutOfMemory even having sufficient memory

Problem I have a problem in my program that when the process reaches more than 1.5 GB of memory usage the process stops running and displays a OutOfMemory error. In my process I'm reading a .AVI file and saving each frame to...
asked by 21.02.2014 / 21:06
2
answers

How to write HTML within the Ajax success

I have a project in ASP.NET MVC 4 and in it I have a Ajax request where it calls the controller sending only one parameter. The request does everything correctly, it brings me a list of the data I need. What I want to kno...
asked by 19.03.2014 / 19:56
1
answer

Can not convert from 'string' to 'System.IFormatProvider'

Follow the code (it works): var teste = 1; var teste1 = teste.ToString("000000"); Result:    000001 Here is another code (not working): var teste = "1"; var teste1 = teste.ToString("000000"); Result:    Can not convert from '...
asked by 26.04.2017 / 23:35
1
answer

Make calculation using LINQ

I'm developing a program in C #. In it I have three tables: produto { string idProduto; string descricao; } entrada { string idProduto; int quant; } saida { string idProduto; int quant; } I want to create a class l...
asked by 29.04.2017 / 16:51
1
answer

Reflection with list property

How can I change the value of the class property in the list? My variable classPropValueList always comes null. I'm trying to make a reflection of every class that inherits from Coisable , to change its string properties....
asked by 08.05.2017 / 15:24
1
answer

Error saving list of related objects

I'm using BeginCollectionItem to insert objects related to a Cliente that I call Dependentes . When saving, I get the error:    Violation of the PRIMARY KEY constraint 'PK_dbo.Dependents'. It's not possible   insert the...
asked by 05.05.2017 / 14:03
2
answers

Assign Tuple return in two variables

It has a method that returns a tuple with two strings . The return I want to write to two different variables, but I'm having to call the method twice to pick up one item at a time. string retorno1 = SearchTerra(artista, musica).item1...
asked by 12.04.2017 / 22:27
1
answer

Default Event Exit on the ESC key

Currently on my system I use the KeyPress event to identify the key Esc and thus close my form, however I have a large system with more than 50 forms and even more being developed: / p> My question is: Is there any standard way to set...
asked by 10.04.2017 / 15:17
1
answer

Garbage collector is automatic?

I noticed that my application was deliberately consuming the memory even after the end of processing, even finalizing everything that was started so I called the GC.Collect(); and the memory was released. Garbage collector should not...
asked by 12.05.2017 / 22:46
2
answers

Put social media buttons on the site

I'm "joking" with SPA MVC (C #) and would like to know how I put social media buttons on my site. I looked for some examples here on the site and by my query, I did not find anything that suited me. Another thing is that the examples I get on th...
asked by 16.05.2017 / 18:02