Questions tagged as 'c#'

3
answers

What are the main differences between VB.Net and C #?

In addition to the syntax, what are the main differences between these two languages? Is there any performance difference between them? Or is there a case in which it is extremely advisable to use one language and not the other, or is VB.Net...
asked by 22.02.2015 / 18:31
3
answers

Is it correct to call a method, and pass its null parameters?

For example, I have the click event of a button calling the method below: //Evento this.serviçoToolStripMenuItem1.Click += new System.EventHandler(this.Nivel_Serv_Click); //Metodo private void Nivel_Serv_Click(object sender, EventArgs e...
asked by 27.06.2017 / 12:36
2
answers

For with a ";" at the beginning of the loop, which means

I got a code with a for: for (; indField > 0 && indMask > 0; ) What does this ";" mean at the beginning and end of the command?     
asked by 29.12.2016 / 16:17
1
answer

App Mobile Multiplatform with Xamarin

Scenario This question is more architecture-oriented. I recently started learning Xamarin to develop Apps Mobile, Xamarin, which until then has proven to be very flexible, has bindings for native Android and iPhone APIs. Question (...
asked by 24.01.2014 / 19:11
4
answers

How to display value related to combobox in the textbox?

I'm doing a project in C # and SQL Server, and I need the item selected in the combo to display the corresponding values in a textbox . Here are the codes I've tried: private void preencherCBDescricao() {...
asked by 28.11.2015 / 19:39
2
answers

Perform Stress Test in C #

I have the following scenario: There is a Windows Service , done in C #, which is used to synchronize data from a local base with a cloud base and need to perform some stress tests and load, with this, I thought to perform the following test:...
asked by 22.06.2017 / 19:25
8
answers

Error: not all paths return a value

I would like to understand why my code is generating the error    not all paths return to value using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using...
asked by 03.05.2017 / 19:44
4
answers

Multiple contexts Migrations Entity Framework

I have several projects and each project has a context. I would like to know how to use Migrations to update and generate only one database of these various contexts?     
asked by 26.02.2015 / 06:40
2
answers

Sort ListT using regex

I have a List of directories that is sorted by name: List<DirectoryInfo> dirs = parentdir.GetDirectories().OrderBy(c => c.Name).ToList(); The problem is that I have folders whose names are numbers separated by periods (as if...
asked by 10.04.2015 / 19:43
1
answer

How to really understand Streams?

I've been working with C # and .NET for a while, and I've seen the use of streams for file reading, HTML response writing, file upload, and more. It turns out that until today I did not understand what a stream really is, when they should be use...
asked by 07.02.2015 / 01:24