Questions tagged as 'c#'

1
answer

How to convert "WebClient" to "async / await"?

I have code that checks to see if it has the internet or not. public static bool InternetIsConnected() { try { using (var client = new WebClient()) { using (client.OpenRead("http://clients3.google.com/genera...
asked by 18.02.2018 / 16:04
1
answer

What is the difference between Table and Matrix and List in Report View?

So far in my reports I have been using tables and binding my datasets to those. But today I had to use a List to create a card (I'm still trying to understand how it works). When to use Table, Matrix and List and their differences?...
asked by 16.02.2018 / 12:27
1
answer

Return selected object in datagridview

I have the following parameterization of my datagridview: List<ModelAluno> alunos; ModelAluno aluno = new ModelAluno(); public PesquisaAluno(List<ModelAluno> alunos) { InitializeComponent(); this.al...
asked by 25.03.2018 / 16:40
1
answer

ComboBox Visual Studio Csharp

I'm completing a system with two combobox In comboBox1 you should see the folder name for the user selection, In comboBox2 you should see the .exe that will be transferred to a directory after clicking a button...
asked by 24.03.2018 / 07:50
1
answer

How to check the .net core version and uninstall and reinstall another

I need to install the version of .net core 2.0. I need to know which version to install and uninstall to install this one. How do I do this?     
asked by 22.03.2018 / 22:18
1
answer

Convert SQL to LINQ

I have the following table CREATE TABLE 'ultimaposicaorastreadores' ( 'Id' CHAR(36) COLLATE utf8_bin NOT NULL DEFAULT '', 'Serial' BIGINT(20) NOT NULL, 'DataGps' DATETIME NOT NULL, PRIMARY KEY USING BTREE ('Id', 'DataGps'), KEY 'serial_idx' US...
asked by 11.01.2018 / 17:32
1
answer

Color word "up" a limiter

I need to color in the RichTextBox filled with several lines, a text before a limiter, Note for example the highlights: 1- not to paint because there is no limit 2 Paint because it has a limit : do not paint 3- do not paint because the...
asked by 10.01.2018 / 14:32
2
answers

Create Database using Fluent Nhibernate

Is there any way to create a new database directly from my application? I'm using Asp.Net MVC5 C #, Fluent Nhibernate and PostgreSQL. Note: I can already access my tables through the application, what I need is to generate a new database thro...
asked by 10.01.2018 / 18:43
1
answer

Create nuget package from a REST API Web application

I have a web service API REST in ASP.NET CORE 2.0 several projects (layers) in it. However, for larger forces, it can not be used as a service. It was then suggested to create a nuget package for this WEB API. I've never created a nuget packa...
asked by 10.01.2018 / 21:59
1
answer

Log off and redirect user to login screen ASP NET MVC / C #

I'm looking for a way to end my session and redirect the user to the login screen when my system TimeOut . I tried to use Session.Abandon () according to some examples that I researched. But I do not know what I'm doing wrong. below is my co...
asked by 18.01.2018 / 11:57