Questions tagged as 'c#'

1
answer

Composition with fluent interfaces

I'm trying to make a class using composition, fluent methods and I'm having some problems. I would like to access a property of a composite method through fluent interfaces but I can not implement the abstract method. The case is as follow...
asked by 08.10.2014 / 20:23
1
answer

How to List Users with Asp.Net MVC 5

I'm using Visual Studio 2013, I'm creating a new Asp.NET Web Application project using MVC and "Individual User Account" authentication. I would like to know how to list all registered users. Models: IdentityModel using Microsoft....
asked by 25.03.2014 / 15:01
1
answer

How to display correct name in a bitwise enum?

I have the following enum marked as [Flag] , that is, they are values in bit [Flags] public enum Position { None, Left, Right, Both=3 } Sete for Both (both) position in 3 because if it is Left and...
asked by 13.04.2014 / 21:12
1
answer

Multiple authentication types

In my system I need to have two types of authentication for Common User that will register and etc ... and another for the administrator my question is how do I differentiate the two authentication using FormsAuthentication, I believe it will ha...
asked by 20.05.2014 / 16:20
1
answer

What is a type reference?

I was reading about the keyword ref e I came across a warning that said not to confuse passing by reference with type reference . No doubt this warning left me confused and raised more doubts about the subject, as I could not see the...
asked by 29.07.2018 / 02:03
1
answer

WPF - The SelectedItem property of the ComboBox is not working correctly

Note: This question was the adapted translation of the original question, so all Updates of the original question are together in this text, sorry for that, but the time is short and I can not stop to make a better text, but thanks for the atte...
asked by 18.12.2013 / 17:48
1
answer

How to write an asynchronous method?

I have the following method: public void Contar() { int numero = 1; for (int i = 0; i < 100000; i++) { numero *= i } return numero } Assuming that the Contar() method takes so long to crash the UI of...
asked by 11.07.2017 / 04:09
1
answer

Upload Gif while site loads!

I am developing a site (MVC), where there is a user's option to select an Excel file, and all the data in the table is sent to the database and only then a warning of success or failure appears when writing the data . This task takes some tim...
asked by 05.06.2017 / 17:48
1
answer

Using synchronous methods along with asynchronous

For development reasons, I had to create a call to an asynchronous method in a synchronous method, but when I publish my project to the server, it is for an indefinite time running. Asynchronous method public static async Task<IEnumerabl...
asked by 26.01.2017 / 15:07
2
answers

How to pass variables from the Controller to the View in ASP.NET MVC 4.5?

I'm pretty familiar with MVC in PHP where I can pass the values to view from the controller as follows: public function Index(Users user) { return View('index') ->with('user', $user); } Or to return validation errors: p...
asked by 24.02.2016 / 17:09