Questions tagged as 'c#'

1
answer

What benefits of using the = operator in common methods that are not related to Lists or Lambda Expression?

I asked the following question: # and the user @bigown answered me, however, in the answer he used an operator and this gave me a new question. I questioned the same about the use of the operator and he indicated to me the following link for cla...
asked by 23.05.2017 / 23:41
1
answer

Random () generating repeated numbers

I'm developing a small application to import XML, which searches for the items in the note and performs the search of the same in% of the internal% of the company. When the item is not found, the link is done manually and this information is sav...
asked by 25.03.2015 / 13:35
2
answers

Login with network user (AD)

I need to log in to the user on my system, with the user logged in to the company network. I've never done this and am having second thoughts on how to get user in AD. I am doing research on the net and still can not understand how to search for...
asked by 26.08.2014 / 13:36
1
answer

What maximum number of items can I put inside a ListT in C #?

I have several performance doubts in my application. What is the maximum number of items that I can get within my List<T> and what is "acceptable" within good practices.     
asked by 01.08.2017 / 17:04
1
answer

How to Create DropDownList in ASP.NET MVC 4

Could you help me create a DropDownList in MVC4? I have the class ProjetoFuncionario which is an associative class of Projeto and Funcionario . Should I create a class for DropDown? I'm having a hard time crea...
asked by 15.11.2014 / 21:45
2
answers

Receiving undefined number of parameters in C #

The Main(string[] args) method receives an array of indefinite quantity parameters. But I know this does not work in a common method. How do I create a method that receives how many parameters are needed?     
asked by 01.05.2014 / 22:04
2
answers

In which scenario is it recommended to use KeyedCollection instead of a Dictionary?

I did not know of the existence of KeyedCollection until you see this #
asked by 27.03.2015 / 11:58
1
answer

How to fix EntityValidationErrors

Hi, I need some help. After compiling my project I'm getting an error:    Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. I have already discovered that this error is caused in the execu...
asked by 30.05.2014 / 05:26
4
answers

Removing numbers at the end of a string Regex C #

I have a string that contains the names of some records. Examples: string nome = "MARIA APARECIDA DE SOUZA MOURA 636598241"; string nome = "MARIA APARECIDA DE SOUZA MOURA 2018"; I would like to remove the numbers only when they are at th...
asked by 17.01.2018 / 14:05
1
answer

ConnectionString different for different builds

I have two connection string, one when I'm developing that uses my local bank and another for when I deploy the application in Azure. I want the application to know which one to use depending on the type of build I do. What is the simplest wa...
asked by 13.08.2015 / 22:58