Questions tagged as 'c#'

1
answer

What does the "$" symbol mean before a string?

Viewing a code here in SOpt, I noticed the use of the "$" symbol and I was not sure how to use it. What is the "$" symbol before a string ? What is it for? Why use it? Example using static System.Console; public class Program {...
asked by 07.10.2015 / 14:35
4
answers

What are the differences between Generic Types in C # and Java?

I've studied Java for a long time and I'm well acquainted with the working of generic types in this language: I know there are only compile-time, type type erasure end of it (so that at runtime this information is not available), and I have...
asked by 21.03.2014 / 10:57
7
answers

How do I remove accents in a string?

I have a string áéíóú What I want to convert to aeiou How do I remove the accents? I need to save in the database as a URL.     
asked by 11.12.2013 / 16:51
2
answers

Is it possible to handle receiving data in camel casing using OData?

In the Register method of the WebApiConfig class I have set a CamelCasePropertyNamesContractResolver public static void Register(HttpConfiguration config) { //Resto do código removido para brevidade co...
asked by 25.05.2016 / 15:37
4
answers

What is dependency injection?

I've heard a lot about dependency injection. The question is: How, when and what to use?     
asked by 10.06.2014 / 15:47
7
answers

What are lambda expressions? And what is the purpose of using them?

When I first started using LINQ I saw that I could use the famous lambda expressions . I even know that x => x * x is a lambda expression, but I could not explain to a colleague what they really are, and what the advantage is in us...
asked by 29.01.2014 / 18:36
3
answers

What's the difference between IEnumerable, IQueryable and List?

What is the difference between IEnumerable , IQueryable and List in .NET? When is it better to use one or the other? Why does ReSharper suggest changing the return of this function, for example, from List<T> : private Li...
asked by 27.05.2014 / 18:50
5
answers

What is the difference between string vs string?

I'd like to know what the actual difference is between String (upper case s) and string (lowercase s). Apparently the two have the same goals, but which one is "better" to use?     
asked by 01.02.2014 / 11:31
1
answer

What is the meaning of the "??"

I was looking at some codes and I came across the ?? operator: static int? GetNullableInt() { return null; } int y = x ?? -1; What's the difference between the first code and the second one?     
asked by 16.12.2014 / 17:17
3
answers

What is the signature of a method?

A signature of the common method / function or constructor is made up of its name + number of parameters + type of parameters?     
asked by 10.11.2014 / 11:34