Questions tagged as 'c#'

3
answers

Get MAC Address from the application's client machine

I would like to know the best way to get the client MAC Address from my Asp.Net Web Forms application. Since it's low-level information, I do not think it's as simple as it sounds.     
asked by 18.02.2014 / 20:16
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
3
answers

What is the meaning of an attribute being private and static at the same time in a class?

I'm studying about design pattern singleton , and in a code snippet in java , I came across a situation where I was in doubt. Here is the code snippet below: public class Conexao { private static Conexao instance = new Cone...
asked by 21.11.2015 / 16:26
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
2
answers

What is FastExpando / FastExpandoObject?

I was reading about Dapper and came across a feature of it called FastExpando or FastExpandoObject , I did not understand very well and I had some doubts about this feature. Questions What is FastExpando / FastExpandoObject? What i...
asked by 01.02.2017 / 03:01
2
answers

What is the difference, in practice, between Session and Application?

I'm studying about Web Technologies , and during my class a topic about concepts involving Session and Application came up. The technology covered during class was C# . I did not quite understand the differences between them...
asked by 27.11.2015 / 16:35
2
answers

What's the difference between using (int) variable or Convert.ToInt32 (variable)?

What's the difference between them? When is it best to use one or the other? Examples: string palavra = "10"; var numero = Convert.ToInt32(palavra); // ou (int)palavra ? string palavra2 = "10.50"; var numero2 = (double)palavra2; // ou Conv...
asked by 06.10.2015 / 15:39