Questions tagged as 'c#'

1
answer

What is the difference between Class and Code File in ASP.NET Core?

What is the difference between Class and Code File in ASP.NET Core? There are two types of files in asp.net core, are there any differences between them? And when should we use each?     
asked by 27.03.2018 / 15:48
1
answer

CQRS - When to use and why to use?

What are the advantages of using the CQRS (Command / Query Responsibility Segregation) standard? What are the disadvantages?     
asked by 04.04.2018 / 22:47
1
answer

How to prevent the app from being "minimized" by AppSwitch (RecentApps) Xamarin Android

I need to lock the device for one application only. I use a line in my project that requires my app to make a launcher . So, the initial screen of the device is my application, and HomeButton always points to the application. Lin...
asked by 22.03.2018 / 15:57
1
answer

Export report from ReportViewer to CSV

In ReportViewer using Winforms , when I create the report I only have the option to export to PDF, Excel and Word and I need to add the export option in CSV.     
asked by 26.11.2014 / 11:32
0
answers

Content ID and Policies for use with Youtube API [closed]

I'm trying to upload my videos on Youtube, with Content Policy and Content Id Matching enabled. My project is in .NET with the Youtube API v3 library, but the library only allows the implementation below that is not working either. video.Monet...
asked by 05.09.2016 / 19:40
6
answers

How do I know which is the last element in a list?

I am doing a dynamic sql query, in which I use lists, my problem is, how to know which last element of this list Follow the code you have made so far: List<string> campos = new List<string>(); campos.Add("id"); campos.Add("desc...
asked by 25.06.2015 / 15:42
2
answers

Which loop is faster for or foreach in C #?

I've read articles from some programming languages that the for loop is faster than the foreach , and was wondering if C # has performance differences? >     
asked by 12.10.2016 / 23:21
3
answers

How to invert an integer?

Notice this statement: /* * Faça um programa que peça um numero inteiro positivo e em seguida mostre * este numero invertido. Exemplo: * o 12376489 * => 98467321 * */ Console.Write("Informe um número inteiro para ser inv...
asked by 01.10.2017 / 20:55
5
answers

Return inside try ... catch does not work

I made this method: public int VerificaUltimaAnalise() { //Desenvolvimento WFExecutor vcmpExecutor = null; WFAnalise vcmpAnalise = null; Core vmpaCore = null; int vintCdTransa...
asked by 23.01.2015 / 14:03
1
answer

Recommended way to populate variables with bank data

Assuming this dummy method to get data from the database, let's say SQL Server: public List<DadosDTO> ObterDados() { try { comand = connectionFactory.CreateCommand(); comand.CommandText = "SE...
asked by 01.08.2014 / 15:39