Questions tagged as '.net'

2
answers

What is the difference between IsNullOrEmpty and IsNullOrWhiteSpace?

I have here that there is no practical difference between String.Empty and "" , and then it came to me doubt. What's the difference between using String.IsNullOrEmpty(String) and String.IsNullOrWhiteSpace(String) ?...
asked by 20.12.2016 / 22:30
5
answers

What is the difference between an explicit cast and the as operator?

Always when I convert an object to a specific type, I use an explicit cast , for example: private void textBox1_Leave(object sender, EventArgs e) { TextBox textBoxTemp = (TextBox)sender; MessageBox.Show("Você digitou: " + textBoxTemp....
asked by 22.01.2015 / 19:21
1
answer

Difference between ICollection, IList and List?

What is the difference between ICollection , IList and List ? When should I use each one specifically?     
asked by 23.07.2015 / 17:48
4
answers

How do I return 2 or more values at a time in a method?

It is common to see examples of methods returning one value at a time. I've seen cases where you need to create a class just to package the data and to return more values.    Using generic classes would be the best way to return 2 or more  ...
asked by 06.04.2017 / 13:40
2
answers

What would be real cases of using functional programming in the .NET (F #) world?

Recently (ok, already a couple of months ago) I've been interacting with language F # , which is Microsoft's response to providing a functional programming language on the .NET platform. But it has not been clear to me the real cases and...
asked by 18.12.2013 / 21:03
1
answer

What is the correct way to call C # versions?

There seems to be some confusion with the naming of the C # versions and the technologies that are related to it. Is there a C # 2005? Or a C # 3.5? What is the relationship of C # versions with .Net, Visual Studio, etc.? There are books...
asked by 17.06.2014 / 18:08
2
answers

Multi-core CPUs - Why does not my application use all processor cores?

I have a question that I can not find a convincing answer. There is an application developed in Delphi 7, and in an extremely complex routine (which takes about 2 hours) we noticed that only the first processor core is used, in this case an I...
asked by 23.06.2015 / 21:06
2
answers

Is there an opposite for 'contains'?

I have a list: List<int> lista1 = new List<int>(); lista1.Add(1); lista1.Add(2); lista1.Add(3); List<int> lista2 = new List<int>(); lista2.Add(1); lista2.Add(2); To get from lista1 elements that also exist in...
asked by 12.08.2015 / 21:54
1
answer

What are metadata in C #?

What are metadata in C # / .NET? What are they good for, and how can I use them? I was looking at a template of Visual Studio, and browsing through the files, I came across them.     
asked by 07.01.2016 / 05:04
5
answers

How do I join two results of a query?

I'm developing an application in C # and would like to know how to merge two results from two queries into one. I have the following code: public List<MalaDireta> ObterMalaDireta() { List<MalaDireta> resultado = new List&...
asked by 11.12.2013 / 17:08