Questions tagged as '.net'

5
answers

How to sort list with complex object by one of its properties?

I have a list of objects and I want to sort the list by one of the properties (Desc of string type), how do I do this? public class Foo { public string Desc { get; set; } // Várias outras propriedades } public class Program { sta...
asked by 10.02.2014 / 18:16
1
answer

What is the function of character? in variable type in C #?

I see many third-party codes and I often see the use of the question mark in the variable type. Example: public bool? Status Can anyone explain to me the difference between not having this ? sign in the bool data type.     
asked by 01.08.2014 / 22:33
1
answer

Do replacing strings with Regex slow down than replace?

Let's say I wanted to do something like this question How to convert CamelCase to snake_case in C #? Convert CamelCase to snake_case in C # You had some answers, but I want to highlight these two. Answer 1 string stringSnake =...
asked by 04.07.2016 / 19:10
1
answer

Is it correct to use a using block inside another using block?

Is it correct to use a block using within another block using as in the example below? or is it enough to just put the first using ? public DataTable Listar(string stringMySql, CommandType commandType, List<MySqlPara...
asked by 02.12.2015 / 15:07
1
answer

What is the "runtime environment" really?

Studying a little bit about ASP.NET 5 I came across something that I did not quite understand. To use it you need to install KVM (K Version Manager) and KPM (K Package Manager). KVM is responsible for managing KRE (K Runtime Environment) version...
asked by 19.02.2015 / 18:51
1
answer

What is the difference between "throw" and "throw ex"?

I saw that C # allows you to do ... try { //algum código } catch { throw; } too ... try { //algum código } catch (Exception ex) { throw ex; } and ... try { //algum código } catch (Exception) { throw; } My q...
asked by 28.09.2014 / 18:06
3
answers

What are providers? What is the difference between OLE DB and ODBC?

I need to read dbf files. I found a tutorial to read the same where the author uses these two providers. In the code I only saw differences in the connection string. What are these providers? What's the difference between them?     
asked by 25.06.2014 / 17:56
4
answers

Why is using dynamic something to be avoided?

My company works with development, it is a company practice for all codes to be reviewed by another person before they are approved in pull request . Generally my codes have only a few details to change, but this time the reviewer commented...
asked by 10.05.2017 / 18:36
6
answers

How to go through an enum?

I need to do the following: Pass a string and go through it and take each letter found and add with its corresponding value, type: a = 1, s = 19 and so on. Well, I made a enum with all values of string , starting with a =...
asked by 06.07.2015 / 12:34
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