Questions tagged as '.net'

2
answers

Filter items that do not contain words in my list

I have a personal: List<Grupos> lista = new List<Grupos>(); And I have this code var txtFiltro = "noivas,unhas"; var palavrasFiltro = txtFiltro.ToLower().Split(','); matches = lista.Where(x => !palavrasFiltro.Contains(...
asked by 12.05.2016 / 16:50
2
answers

Is there any way to handle all software exceptions?

I am creating a DLL for use in many of my projects. I've created a method that captures Source, Message, and other variables I've set, mounts an email, and sends it to myself. (a kind of error log by email). Is there any way to reference th...
asked by 30.01.2015 / 16:14
2
answers

Simplify LINQ Query with Contains

I have two questions regarding LINQ queries below: { //lista de itens do orçamento var ids = itensOrcamento.Select(p => p.Id); //Produtos - todos produtos cadastrados var produtos = Produtos.Where(p => ids.Contains(p...
asked by 31.12.2015 / 21:36
2
answers

Keep data between sessions

I have an ASP.Net MVC project where I generate a report that requires a lot of the machine's processing feature. I have a Action that generates and another that returns the report data in an Object List, so I thought that by creating a...
asked by 13.09.2015 / 14:58
2
answers

When should I use GC.SuppressFinalize ()?

In .NET, under what circumstances should GC.SuppressFinalize() be used? What are the advantages of using this method? Note: I found the answer in the SO-en: When should I use GC.SuppressFinalize ()? As I did not have something r...
asked by 08.12.2015 / 14:35
1
answer

How useful are indexers?

I was watching and Csharp has indexers. Second definition on the microsoft: site    Indexers allow instances of a class or structure   are indexed only as vectors. Examples: internal class Indexador<T> { private T[]...
asked by 27.05.2015 / 19:46
1
answer

What is the Level Trust of an ASP.NET application?

What is the Level Trust setting for an ASP.NET application? Does it protect the server from anything? Does it protect the application from anything? In which case or for what reason is it recommended or necessary to change this setting?...
asked by 31.10.2016 / 18:23
1
answer

How to create a monolithic executable from the .NET application?

I would not like to deploy the application full of DLL, I wanted something simple, without installer, I wanted to generate a single executable file, but .NET is all based on DLL. Can you generate a single executable?     
asked by 27.03.2017 / 14:04
1
answer

Can you notify us that there will be a garbage collection?

I am studying about the garbage collector of .NET and wanted to know if there is an event I can sign up to and always know when a collection will be made.     
asked by 08.05.2017 / 16:46
1
answer

How to sort a list of objects by DUAS properties

In this topic: How to sort list with complex object by one of its properties? is explained how to sort by a property, but how to sort by two? Considering the following product class: +-------------------+--------------------+ | Produto...
asked by 01.04.2014 / 20:57