Questions tagged as 'c#'

2
answers

C # MVC Asp .NET Paging

I have a performance problem in paging with Entity Framework and SQL SERVER, first it does getAll to later list paging var bdPergunta = new PerguntaRepositorioEF(contexto); var pergunta = bdPergunta.GetAll().OrderByDescending(x => x....
asked by 29.07.2015 / 15:41
2
answers

Is Tuple the same thing as creating an object?

I've used Tuple a few times today came the doubt, this: public class User{ public String Name {get; set;} public String LastName {get; set;} } new User(){ Name = "Leonardo", LastName = "Bonetti" } Is it the same as...
asked by 13.08.2018 / 17:05
2
answers

Convert.ToString () and .ToString ()

Are there any glaring differences between them? Whether in performance or ways of treating, what are their particularities? What would be the correct way to use it (if there is any difference)?     
asked by 06.04.2016 / 20:03
2
answers

SQL - Restrict query data

Good morning, I have an app in WebForms that from two DropDownList gets data from a database in MS SQL Server 2012 . At first DropDownList it will display the name of several companies in the database with the fo...
asked by 15.04.2016 / 10:50
3
answers

What is the difference between "decimal.Divide" and the traditional "/" in C #?

decimal a = 10/5; Returns 2 decimal b = decimal.Divide(10,5); Returns 2     
asked by 26.04.2016 / 23:45
1
answer

What is the difference between "using" and "using static"?

In a question I asked about C #, @bigown answered me and put a sample code in DotNetFiddle. The code is this: using static System.Console; public class Program { public static void Main() { var objects = new [] { ne...
asked by 16.06.2016 / 18:42
1
answer

What is the "global ::" in C #?

I've been editing a source code for an application I'm writing in C #, which uses GTK +. I have some knowledge of C #, but I did not understand why some variables were written when I mounted the UI in the "drag and drop" with global::...
asked by 15.03.2017 / 18:50
2
answers

user tree with points and profile in C #

I have a list of users who each have a sponsor (sponsor is also a user). Each user has points and is of one type. I want to know which branch of the tree has the highest number of points, and for each branch know how many equal types I have. Sup...
asked by 01.06.2015 / 23:39
2
answers

Does C # have native serialization?

In PHP there is a language serialization feature. I mean: I'm not talking about using JSON or XML , but I'm talking about a serialization in a language-specific format. For example, if I want to serialize a array or a o...
asked by 02.01.2017 / 14:57
2
answers

Deserialize Json where the key is a number

I'm trying to deserialize Json with C #, but I've encountered a problem. In Json you can use numbers in the names of "keys" ( keys ), but we can not use numbers in property names in C # Example: Json : "c":[ { "1":23200...
asked by 03.02.2016 / 01:02