Questions tagged as '.net'

1
answer

Find slow point in .Net code

I need to parse a code that is taking too long to execute, the method code is extensive and makes several calls to other methods, I've been debugging to try to identify the slow point, but this is very difficult . Does Visual Studio have any...
asked by 14.01.2016 / 12:14
2
answers

Is there an alternative to RemoveAt?

I'm using Entity Framework in an Asp.Net MVC project where I have a simple list of strings and need to remove only the first item. I used the following command: minhaLista.RemoveAt(0); Well, but using a Visual Studio performance tool, I...
asked by 10.02.2016 / 21:02
1
answer

How to create a log in html with log4net

I have a project that already uses log4net, but I would like to display this log in HTML. I searched through multiple sites and no one implemented this solution. Does anyone have any idea how to do this?     
asked by 26.06.2015 / 20:49
1
answer

Capture pressed buttons on video game control reliably

I want to use an XBox control to control a program. It's not a game, it's just a Windows Forms application. I do not want to use XNA because I do not want to force the redistributables to download when I use my application on another machine....
asked by 23.03.2014 / 20:45
1
answer

Can you use a dialog to open both folders and files?

Well, I'm using openfiledialog to open files, but the software needs to receive files or folders, because it compresses and zips ( .zip ) to then make a symmetric cipher. I searched through a number of sites and the like, and I d...
asked by 21.12.2015 / 14:22
1
answer

sealed class, with private constructor, versus static class

By "studying" this class , I checked that it is sealed and has the private constructor: public sealed class Interaction { /// <remarks> /// CA1053: Static holder types should not have public constructors /// </rema...
asked by 11.01.2017 / 16:25
1
answer

What is the best way to exit a C # application?

The most common way is to exit with return in Main() . But I saw that there are Environment.Exit() . and Application.Exit() . When should we use each?     
asked by 18.04.2017 / 14:26
2
answers

What is the purpose of the UseShellExecute property?

Developing an application in C # I came across the UseShellExecute property in the following code snippet: ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.CreateNoWindow = false; startInfo.UseShellExecute = false; startIn...
asked by 05.05.2017 / 15:45
3
answers

LINQ with condition in where using variable

I have the following table: USUARIO Nome | Idade João | 21 Maria | 18 I want to make only one query that returns all users, or only returns users of a specific age based on a C # variable. Also by name. int idade = 18;...
asked by 26.08.2015 / 22:01
2
answers

Is it possible to join a C # form to a VB.NET project?

I have two distinct projects, one with just one form in C #, can I embed the form in my project in VB.NET?     
asked by 18.06.2015 / 06:13