Questions tagged as '.net'

2
answers

Managing and releasing memory

1) When I create an object, where it has arrays and large variables, setting them to null , will it help with the reduction? Within a method Dispose() - being that before they were with some value. 2) When I call a Dispose()...
asked by 02.12.2017 / 02:13
2
answers

Get previous element in foreach

Is it possible to take an element from the previous position to the current position using the foreach loop? For example, whenever I need to pick up an element earlier than the current loop position, I use the for loop as follow...
asked by 24.01.2018 / 14:47
1
answer

Xamarin.Forms Portable or Xamarin.Forms Shared

What is the difference between a Xamarin.Forms Portable project or Xamarin.Forms Shared?     
asked by 09.05.2016 / 18:49
2
answers

Display decimal places (Currency) is rounding

I have an application where the price should go in int format without decimals. int Valor = (int)(produto.Valor * 100); //o produto.Valor é um decimal The problem is when I want to display this value in View For products like 0....
asked by 12.04.2016 / 18:41
1
answer

What are Mutexes and when is it advisable to use this feature?

I read about Mutexes and the class Mutex . However, I can not clearly understand what Mutex really is and what this class does. Being that I would like to know if I can use this feature to prevent my desktop application from running more t...
asked by 15.10.2018 / 16:24
1
answer

What is an AppDomain?

I've read about this on the Microsoft website . Would it be interesting to have a succinct answer here in Portuguese with a summary of what it is? Is there anything important that is not in the documentation?     
asked by 22.03.2017 / 13:27
2
answers

Allow new conditions to be added without modifying code

I'm manipulating a .txt and I have to change values of type M31 to T90 for example. My code is like this: //Change machine tools for Sodick if (_strLinesFinal.Contains("M50"))...
asked by 11.10.2016 / 14:08
1
answer

How to create a window without using the GUI builder?

I'm starting to study C # and just like in Java, IDEs provide features that make it possible to build GUIs easily by dragging components. The netbeans has a powerful build tool where you can drag Swing components for JFrame , JDialog...
asked by 21.12.2014 / 02:29
1
answer

Compatibility between .NET Core 2.0 and .NET Framework 4.7

I'm creating a general purpose library (DLL) for reuse in .Net Core 2.0 and .Net Framework 4.7 projects. I want to have .Net Core projects in Linux and .Net Framework 4.7 projects for Windows. Can a library developed with .Net Core 2.0 be used i...
asked by 20.08.2017 / 22:11
4
answers

How to avoid repetition in LINQ queries?

I have the following LINQ query that is in a method that returns all products: var query = from p in Produtos select new Produto { ProdutoId = p.ProdutoId, Descricao = p.Descricao, Preco = p.Preco, Estoq...
asked by 17.01.2016 / 16:04