Questions tagged as 'c#'

2
answers

How to filter a list asynchronously using LINQ?

Code sample without using async: var products = db.Products.Where(_ => _.UserId == currentUserId); How do I make this query asynchronous taking into account that Where of Linq does not support the use of await ?     
asked by 16.09.2014 / 18:05
3
answers

Clone class objects using ICloneable

I'm trying to use the Interface ICloneable to copy an object, but I'm having a problem when it is owned by a class because ICloneable does not create a new memory address for these objects, but keeps pointing to the original memory address o...
asked by 07.04.2014 / 13:37
4
answers

Generate sequential IDs without losing the sequence

By Identity do not want to, because it breaks the sequence if something happens. Max() + 1 , I find it very vulnerable and slow when I have many records. So I ask, is there a way that someone knows, that I can generate sequential n...
asked by 05.06.2014 / 20:33
3
answers

Working with OCR to recognize photos

I am currently working on my Course Completion Work and the subject involves OCR. I did some research and found the Tesseract , I also found libraries in Nuget for it (I'm using C #). The problem is that my work is about reading Car Plate, when...
asked by 28.08.2014 / 13:54
2
answers

Faster way to save multiple entities with Entityframework

I have a performance problem in one method, in addition to causing full use of CPU of the server this method takes a long time to execute. internal async void NotificacaoIosTodos(string titulo, int posicao, int unidadeId) {...
asked by 09.08.2017 / 00:53
4
answers

Which DBMS do I use so it can be installed on the client computer to run a C # application?

I'm developing a small C # system that will eventually be deployed to client computers by accessing a local database. Initially I was going to use SQL Server, but I would have to install it next to the system, and it gets kinda heavy for just...
asked by 11.07.2017 / 11:15
1
answer

Why is the expression (double.MinValue == double.MinValue + 1) true?

The following C # code: public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine(double.MinValue == double.MinValue + 1); Console.WriteLine(int.MinValue == int.MinV...
asked by 21.09.2017 / 00:25
2
answers

What are the advantages of creating dll's in the project and not putting the classes directly in it?

In the company where I use many DLL's and I have a lot of trouble debugging and understanding this ... In my projects (personal) I always put the classes straight in the same and I do not like them, I find it much easier so, which the advantage...
asked by 17.04.2018 / 15:46
1
answer

Sort list by similarity to a string

I have a list of string : AAA BBB CCC ABB ABC ACC ACD The user will type what he is looking for, he would like to take to the first positions, the most similar ones. Example: String: A Result: AAA ABB ABC ACC ACD BBB CC...
asked by 30.11.2017 / 18:37
1
answer

New vs Override [duplicate]

What would be the difference between new and override? Home Examples: Override: public class ClasseBase { public virtual void Funcao () { } } public class Classe : ClasseBase { public override void Funcao() { }...
asked by 16.09.2017 / 15:10