Top ".net" questions

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

Error 0x80005000 and DirectoryServices

I'm trying to run a simple LDAP query using directory services in .Net. DirectoryEntry directoryEntry = new DirectoryEntry("LDAP://someserver.contoso.…

c# .net wcf active-directory directoryservices
The opposite of Intersect()

Intersect can be used to find matches between two collections, like so: // Assign two arrays. int[] array1 = { 1, 2, 3 }; int[] array2 = { 2, 3, 4 }; // Call …

c# .net collections intersect
Double.TryParse or Convert.ToDouble - which is faster and safer?

My application reads an Excel file using VSTO and adds the read data to a StringDictionary. It adds only data …

c# .net parsing double
C# - Insert a variable number of spaces into a string? (Formatting an output file)

Alrighty, I'm taking data from a list that I populate a DataGridView with and am exporting it to a text …

c# .net visual-studio-2010 string string-formatting
Binding ItemsSource of a ComboBoxColumn in WPF DataGrid

I have two simple Model classes and a ViewModel... public class GridItem { public string Name { get; set; } public int CompanyID { …

.net wpf binding wpfdatagrid datagridcomboboxcolumn
Release generating .pdb files, why?

Why does Visual Studio 2005 generate the .pdb files when compiling in release? I won't be debugging a release build, so …

.net visual-studio debugging pdb-files debug-symbols
Remove item from list based on condition

I have a struct like this: public struct stuff { public int ID; public int quan; } and want to to remove …

c# .net entity-framework linq
How can I protect my .NET assemblies from decompilation?

One if the first things I learned when I started with C# was the most important one. You can decompile …

c# .net decompiling reflector
.NET Console Application Exit Event

In .NET, is there a method, such as an event, for detecting when a Console Application is exiting? I need …

.net console-application complexity-theory
How do I round a float upwards to the nearest int in C#?

In C#, how do I round a float upwards to the nearest int? I see Math.Ceiling and Math.Round, …

c# .net rounding