Questions tagged as 'c#'

1
answer

Using WaitAll in C #

I have the following problem: A program generates two types of threads A and B through clicks on their respective buttons. Both types can not run at the same time. If I have 10 threads A, B can only execute when 10 of type A ends. I can re...
asked by 15.12.2014 / 01:08
3
answers

Best practice to check if the module is being used

My question that maybe - hopefully not - can be considered as opinion, is conceptual and even simple. In most applications, we work with features that when used by multiple users at the same time, can cause some problem in the database. In my...
asked by 22.05.2015 / 16:24
1
answer

Access modifier Internal X public

When to use public or internal? Is there any advantage / disadvantage between them?
asked by 17.11.2015 / 22:24
2
answers

Warning: "Possible multiple enumeration of IEnumerable"

I was doing some operations where I make use of collections. In one of these I needed to get a range (% w / o%) of numbers and did the following: var range = Enumerable.Range(0, 4); And then I tried to do something like var primeiro = ra...
asked by 25.11.2015 / 12:55
1
answer

Strange property initialization

When reading a tutorial on Entity Framework, I came across an example code where there was a line that, for me, is unknown: Student stud = new Student() { StudentName = "New Student" }; I understand that a new object of type Student...
asked by 02.05.2016 / 16:29
2
answers

Comparison with Postgresql database using C #

I created a Login application, I made the connection to the database, I get the user and password registered in my bank. But what I want is, if the user tries more than three times to get in and has something wrong, block the textbox and butt...
asked by 09.07.2015 / 21:07
1
answer

ProgressDialog in C #

I'm trying to create a form similar to ProgressDialog in android, in C # .. The idea would be for this to happen: //criar o controle na thread principal frmWaitingProgress fl = new frmWaitingProgress(this); fl.Show(this); //fazer todo o p...
asked by 08.12.2016 / 13:04
1
answer

How to map an image attribute by Fluent API?

I would like to know how to map an attribute of type image of SqlServer to the Fluent API. In my database I have the following table: CREATE TABLE [dbo].[ProdutoFotoERP]( [ProdutoFotoID] [int] NOT NULL, [Produt...
asked by 11.10.2016 / 18:54
1
answer

Structure / Organization Project C #

I have a project that I'm developing in layers, so far I have the following: Access to data, presentation, business and transfer objects. The question is: Example: I have form to register a legal entity in the database. To save the dat...
asked by 26.10.2016 / 15:16
1
answer

Multi-Client Web API Structure

I have the following situation: I have a Web application that accesses the data through a C # WebAPI. I need to apply the concept of multitenancy in it to allow my application to be accessed by multiple clients and that each client access y...
asked by 03.01.2017 / 14:43