Top ".net" questions

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

How to avoid a System.Runtime.InteropServices.COMException?

In my Microsoft Surface project, I always get a lot of the following exceptions: 'MuReSe.vshost.exe' (Managed (v2.0.50727)): Loaded …

c# .net wpf exception pixelsense
LINQ: "contains" and a Lambda query

I have a List<BuildingStatus> called buildingStatus. I'd like to check whether it contains a status whose char …

c# .net list linq lambda
Error 5 : Access Denied when starting windows service

I'm getting this error when I try to start a windows service I've created in C#: My Code so far: …

c# .net wcf windows-services
Cannot delete directory with Directory.Delete(path, true)

I'm using .NET 3.5, trying to recursively delete a directory using: Directory.Delete(myPath, true); My understanding is that this should …

c# .net exception io
How do I fix a .NET windows application crashing at startup with Exception code: 0xE0434352?

I've built a .NET Windows Forms application in Visual Studio 2010. I also built a corresponding setup/install package via Visual …

c# .net winforms visual-studio-2010
Wait until a process ends

I've an application which does Process.Start() to start another application 'ABC'. I want to wait till that application ends (…

c# .net process
How do I jump out of a foreach loop in C#?

How do I break out of a foreach loop in C# if one of the elements meets the requirement? For …

c# .net foreach
What is the best way to check for Internet connectivity using .NET?

What is the fastest and most efficient way to check for Internet connectivity in .NET?

c# .net internet-connection
Read a XML (from a string) and get some fields - Problems reading XML

I have this XML (stored in a C# string called myXML) <?xml version="1.0" encoding="utf-16"?> <myDataz xmlns:…

c# .net xml parsing xml-parsing
Exact time measurement for performance testing

What is the most exact way of seeing how long something, for example a method call, took in code? The …

c# .net performance testing