All Questions

66
votes
15answers
364145 views

What is the best way to parse html in C#?

I'm looking for a library/method to parse an html file with more html specific features than generic xml parsing libraries.
639
votes
17answers
368533 views

Is there a way to check if a file is in use?

I'm writing a program in C# that needs to repeatedly access 1 image file. Most of the time it works, but if my computer's running fast, it will try to access the file before it's been saved back to th...
374
votes
30answers
276577 views

What Are Some Good .NET Profilers?

What profilers have you used when working with .net programs, and which would you particularly recommend?
1667
votes
16answers
682832 views

Difference between decimal, float and double in .NET?

What is the difference between decimal, float and double in .NET? When would someone use one of these?
1284
votes
18answers
252771 views

Proper use of the IDisposable interface

I know from reading the MSDN documentation that the "primary" use of the IDisposable interface is to clean up unmanaged resources. To me, "unmanaged" means things like database connections, sockets, ...
270
votes
20answers
311135 views

Upload files with HTTPWebrequest (multipart/form-data)

Is there any class, library or some piece of code which will help me to upload files with HTTPWebrequest? Edit 2: I do not want to upload to a WebDAV folder or something like that. I want to simula...
4886
votes
57answers
792283 views

What is the difference between String and string in C#?

Example (note the case): string s = "Hello world!"; String S = "Hello world!"; What are the guidelines for the use of each? And what are the differences?
438
votes
11answers
308684 views

How do you do a deep copy of an object in .NET (C# specifically)?

I want a true deep copy. In Java, this was easy, but how do you do it in C#?
526
votes
33answers
148153 views

What is the correct way to create a single-instance application?

Using C# and WPF under .NET (rather than Windows Forms or console), what is the correct way to create an application that can only be run as a single instance? I know it has something to do with some...
128
votes
3answers
40105 views

Understanding garbage collection in .NET

Consider the below code: public class Class1 { public static int c; ~Class1() { c++; } } public class Class2 { public static void Main() { { var c...

Previous Next