Questions tagged as '.net'

2
answers

Get content inside string

I will have a list of string in the following format: PERSON NAME ( LOGIN ), / p> So, I would need to get only what would be within the parentheses, ie zackson.morgan . How to do this?     
asked by 14.03.2015 / 02:57
2
answers

Inheritance class Object

How does the compiler do to implicitly all classes inherit from object ? This is a behavior adopted in languages such as C #, Java and others. public class Funcionario { } public class Funcionario : Object { } The above example...
asked by 14.11.2016 / 13:31
2
answers

Get property values from a class

I have the following codes: private PropertyInfo[] ObterPropriedades(Type classe) { PropertyInfo[] properties = classe.GetProperties(); return properties; } private string[] ObterValoresPropriedades(Type classe) { List<string>...
asked by 22.12.2014 / 18:01
2
answers

How to make LINQ filter for every X months?

Hello, I would like to know the best way to filter a list of objects using LINQ in C #, I have a list of objects called Measurement , each measurement has a Date property, which is the date that was registered. What I want to respond to is:...
asked by 18.01.2016 / 20:00
2
answers

How to get the total memory occupied by the application?

I know there's GC.GetTotalMemory , but it only shows the consumption of managed memory. Can you find full application usage?     
asked by 17.04.2017 / 14:38
2
answers

Return DataReader to field type bool

I need to return a field that is of type bool : public List<TB_USUARIO> ListarTodos() { var strQuery = "select * from tb_usuario"; using (contexto = new Contexto()) { var retornoDataRead...
asked by 11.05.2016 / 17:36
2
answers

What are the advantages of parallel.ForEach in C #?

Working with C # I have seen that we have the option to work with parallel.ForEach() . What is the advantage of working with it and not foreach ?     
asked by 14.05.2016 / 03:36
2
answers

How does C # run on other platforms?

As a complement to this question , run C # in a where the .NET Framework is native, it is standard to run the application executable. As far as I know, C # depends on the .NET Framework to be compiled and run , and thus have all code functio...
asked by 17.07.2018 / 19:36
1
answer

How can lambda expressions handle stack variables?

I'm learning C # and I'm reading about lambdas expressions. The question that remained is: how does this work and why does it work? public delegate void Test(); public void Foobar(ref Test del) { int var = 10; del...
asked by 12.06.2018 / 18:49
2
answers

Prevent an application from being closed by the user through the task manager

I have a C # application that can not be closed by the user. But even if I eliminate all means of closing the application, including by itself, it is still possible to terminate the process by the task manager. Can you stop this? Is it possible...
asked by 24.02.2015 / 14:28