Questions tagged as '.net'

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

How does running a .Net application work?

There are several terms that I always hear / read when I talk about running .Net applications, such as MSIL , CIL JITer , JITer , JIT among others I should have forgotten. I would like a brief explanation of how running a .Net appl...
asked by 17.03.2016 / 20:40
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
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
2
answers

What are Async methods?

I noticed that most methods in C # have an equal method but with a name async . What are these methods and how do they work?     
asked by 05.01.2017 / 02:13
2
answers

Create list without duplicate values

I have a list of int and I want to save more numbers in it, but numbers that do not repeat themselves. How do I find if it already has a certain value in this list?     
asked by 16.08.2014 / 02:59
2
answers

What are nested types?

I know that C # supports nested types, that is, it is possible for me to declare one class within another. For example: public class A { // Propriedades e métodos da classe A public class B { // Propriedades e métodos da...
asked by 22.02.2015 / 20:58
3
answers

What is the advantage of using the Set method?

What is the advantage or difference in using the Set<> method, and can I do the same without it as in alternative 2? Alternative 1 var aluno = contexto.Alunos.First(x => x.Id == entidade.Id); contexto.Set<**Aluno**>()....
asked by 22.09.2015 / 00:39
2
answers

How to list methods of a class in C #?

Once again I have to say this: I come from PHP and I'm learning C # now. I usually like to list the methods the class has, since I always did this in PHP, to test or debug. $a = new ArrayObject(); get_class_methods($a); What about C #?...
asked by 17.05.2016 / 22:21