Top ".net" questions

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

What is the string length of a GUID?

I want to create a varchar column in SQL that should contain N'guid' while guid is a generated GUID by .…

.net guid varchar sql-types string-length
Unable to update the EntitySet - because it has a DefiningQuery and no <UpdateFunction> element exist

I am using Entity Framework 1 with .net 3.5. I am doing something simple like this: var roomDetails = context.Rooms.ToList(); foreach (…

c# asp.net .net entity-framework primary-key
convert double to int

What is the best way to convert a double to an int? Should a cast be used?

c# .net casting type-conversion
How to open an Excel file in C#?

I am trying to convert some VBA code to C#. I am new to C#. Currently I am trying to …

c# .net excel vsto
Default SecurityProtocol in .NET 4.5

What is the default security protocol for communicating with servers that support up to TLS 1.2? Will .NET by default, choose …

.net security ssl
How do I specify the exit code of a console application in .NET?

I have a trivial console application in .NET. It's just a test part of a larger application. I'd like to …

c# .net exit-code
How do I truncate a .NET string?

I would like to truncate a string such that its length is not longer than a given value. I am …

c# .net string truncate
Check if a value is in an array (C#)

How do I check if a value is in an array in C#? Like, I want to create an array …

c# .net arrays string
Remove characters after specific character in string, then remove substring?

I feel kind of dumb posting this when this seems kind of simple and there are tons of questions on …

c# .net string
Get Cell Value from a DataTable in C#

Here is a DataTable dt, which has lots of data. I want to get the specific Cell Value from the …

c# .net datatable