Questions tagged as 'c#'

1
answer

Use IEnumerable or ICollection?

I want to create a 1x N mapping using the fluent API Entity Framework , something like: a shopping cart has several products. In my cart class, I have a navigation property , which is a collection of products: public class Produto {...
asked by 14.03.2017 / 12:41
1
answer

Using Concat to concatenate array of strings

I was looking at strings and that they are immutable and can not be added to them in pain under penalty of being too slow. The recommendation is to use StringBuilder . But I also saw that there is a version of Concat () that accepts...
asked by 20.03.2017 / 14:45
2
answers

How to map and get only one property or field of a query?

I'm using Dapper to map object properties . See a practical example: var servico = conexao.Query<Servico>(statement.ToSql(), new { IdServico = id }).First(); That is, the Servico object will have all its properties mapped a...
asked by 29.01.2017 / 16:07
2
answers

What is the purpose of flow control to continue? [duplicate]

I found this code explaining the flow control continue . string [] nomes = new string[] { "Macoratti", "Miriam", "Pedro"}; foreach (string nome in nomes) { if (nome == "Miriam") continue; Consol...
asked by 24.05.2017 / 18:50
1
answer

Is there a binary tree in .NET?

I do not know if it's hidden somewhere and I did not see a binary tree structure in .NET. I searched the documentation for all Collection , including sub-levels and nothing. Are not you? Why not have something so important?     
asked by 03.04.2017 / 14:19
2
answers

How to open the MainPage.axml from a Xamarin Project in Designer mode?

So recently I downloaded Visual Studio 2017 and came across the Multiplatform Application (Xamarim.Forms or Native), when I create it it is generated 4 projects. The App1; App1.Droid; App1.IOS; App1.UWP (Universal Windows Plataform) . I...
asked by 23.05.2017 / 05:39
2
answers

What is syncblock?

I received a response that spoke about a syncblock . Why is it necessary? From what I understand, what I researched is competition control. But why does every object need it if not everyone will have competition?     
asked by 28.04.2017 / 16:34
1
answer

How to make an element disappear after it is used?

How to make an element disappear after being used for example:    When clicking on a button it disappears and something like a ListBox appears? Ps1: If the question is confusing, let me know Ps2: If you can tell what to do for the butt...
asked by 11.05.2017 / 13:23
1
answer

How do I toggle the rows of a report with custom Crystal Reports and C # winforms colors?

In the report I'm doing, I've already been able to toggle the colors by doing the following: Menu Access: Crystal Reports - Report - Section Expert Select the section Details and click on the Color...
asked by 22.12.2016 / 18:26
1
answer

Character Camera does not move!

I'm doing a Unity tutorial that I downloaded to the Asset Store at the following link link I tried to make my character turn to look at the mouse, but it can not rotate, and just look forward to the case and I can not make it look at other...
asked by 11.03.2015 / 16:13