Top ".net" questions

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

How do I run a Python script from C#?

This sort of question has been asked before in varying degrees, but I feel it has not been answered in …

c# python .net ironpython python.net
How do I run Visual Studio as an administrator by default?

I recently discovered that even while logged into my personal laptop as an administrator, Visual Studio does not run in …

.net visual-studio visual-studio-2010 installation
Running multiple async tasks and waiting for them all to complete

I need to run multiple async tasks in a console application, and wait for them all to complete before further …

c# .net asynchronous task-parallel-library async-await
Replace multiple characters in a C# string

Is there a better way to replace strings? I am surprised that Replace does not take in a character array …

c# .net string
How to remove new line characters from a string?

I have a string in the following format string s = "This is a Test String.\n This is a next …

c# .net
Accessing a Dictionary.Keys Key through a numeric index

I'm using a Dictionary<string, int> where the int is a count of the key. Now, I need …

c# .net dictionary
Difference between ref and out parameters in .NET

What is the difference between ref and out parameters in .NET? What are the situations where one can be more …

c# .net
LINQ Aggregate algorithm explained

This might sound lame, but I have not been able to find a really good explanation of Aggregate. Good means …

c# .net linq aggregate
DataGridView - how to set column width?

I have a WinForms application with DataGridView control. My control has five columns (say "Name", "Address", "Phone" etc) I am …

.net winforms datagridview controls