Top ".net" questions

Do NOT use for questions about .NET Core - use [.net-core] instead.

Elevating process privilege programmatically?

I'm trying to install a service using InstallUtil.exe but invoked through Process.Start. Here's the code: ProcessStartInfo startInfo = new …

c# .net windows windows-services process-elevation
How to repair COMException error 80040154?

Moving a working C# project from a 64-bit Windows 7 machine to a 32-bit XP machine caused the following error: Retrieving …

.net exception com dllregistration
In C#, how to check if a TCP port is available?

In C# to use a TcpClient or generally to connect to a socket how can I first check if a …

c# .net tcp tcpclient
How to initialize a List<T> to a given size (as opposed to capacity)?

.NET offers a generic list container whose performance is almost identical (see Performance of Arrays vs. Lists question). However they …

c# .net generics list initialization
Is it possible to change the location of packages for NuGet?

I have the following convention for most of my projects: /src /Solution.sln /SolutionFolder /Project1 /Project2 /etc.. /lib /Moq moq.…

.net visual-studio nuget nuget-package
How to get ALL child controls of a Windows Forms form of a specific type (Button/Textbox)?

I need to get all controls on a form that are of type x. I'm pretty sure I saw that …

c# .net vb.net winforms controls
How to select min and max values of a column in a datatable?

For the following datatable column, what is the fastest way to get the min and max values? AccountLevel 0 1 2 3

c# .net select datatable
How do I get the computer name in .NET

How do I get the computer name in .NET c#

c# .net
String vs. StringBuilder

I understand the difference between String and StringBuilder (StringBuilder being mutable) but is there a large performance difference between the …

c# .net performance
Why "net use * /delete" does not work but waits for confirmation in my PowerShell script?

I have a script where I want to disconnect from the mapped drives before I create a new PSDrive. Otherwise …

.net powershell mapped-drive net-use