Top ".net" questions

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

How to hide column of DataGridView when using custom DataSource?

I have a small app in c#, it has a DataGridView that gets filled using: grid.DataSource = MyDatasource array; MyClass …

c# .net datagrid datagridview datagridviewcolumn
SELECT * FROM X WHERE id IN (...) with Dapper ORM

What is the best way to write a query with IN clause using Dapper ORM when the list of values …

.net sql dapper
Declare a Dictionary inside a static class

How to declare a static dictionary object inside a static class? I tried public static class ErrorCode { public const IDictionary&…

c# .net dictionary
Node.js vs .Net performance

I've read a lot about Node.js being fast and able to accommodate large amounts of load. Does anyone have …

.net performance node.js
NuGet auto package restore does not work with MSBuild

I'm trying to build a solution with packages content missing (except repositories.config inside) with MSBuild 12.0. I expect it to …

.net build msbuild nuget nuget-package-restore
C# - Create SQL Server table programmatically

I am trying to create a SQL Server table programmatically. Here is the code. using (SqlConnection con = new SqlConnection(conStr)) { …

c# .net sql-server create-table
How to backup Sql Database Programmatically in C#

I want to write a code to backup my Sql Server 2008 Database using C# in .Net 4 FrameWork. Can anyone help …

.net database sql-server-2008 c#-4.0 backup
Is String.Contains() faster than String.IndexOf()?

I have a string buffer of about 2000 characters and need to check the buffer if it contains a specific string. …

c# .net asp.net performance string
how to use XPath with XDocument?

There is a similar question, but it seems that the solution didn't work out in my case: Weirdness with XDocument, …

c# .net xml xpath linq-to-xml
Error: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

I recently upgraded/updated Entity Framework in an old project from version 4 or 5 to version 6. Now I get this exception: …

c# .net entity-framework ado.net entity-framework-6