Top ".net" questions

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

How to make an HTTP POST web request

Canonical How can I make an HTTP request and send some data using the POST method? I can do a …

c# .net post httpwebrequest httprequest
How can I convert String to Int?

I have a TextBoxD1.Text and I want to convert it to an int to store it in a database. …

c# .net string int type-conversion
What does "Object reference not set to an instance of an object" mean?

I am receiving this error and I'm not sure what it means? Object reference not set to an instance of …

.net nullreferenceexception
What is a NullReferenceException, and how do I fix it?

I have some code and when it executes, it throws a NullReferenceException, saying: Object reference not set to an instance …

c# .net vb.net null nullreferenceexception
How do I turn a C# object into a JSON string in .NET?

I have classes like these: class MyDate { int year, month, day; } class Lad { string firstName; string lastName; MyDate dateOfBirth; } And …

c# .net json serialization
How do I remedy "The breakpoint will not currently be hit. No symbols have been loaded for this document." warning?

A C# desktop application on the express edition worked, but then it didn't work 5 seconds later. I tried the following: …

c# .net visual-studio debugging breakpoints
No connection could be made because the target machine actively refused it?

Sometimes I get the following error while I was doing HttpWebRequest to a WebService. I copied my code below too. …

c# .net asp.net-web-api2 socketexception system.net.webexception
'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

I'm trying to get data from an Excel file on a button click event. My connection string is: string connString = "…

.net excel aceoledb
How do I get a consistent byte representation of strings in C# without manually specifying an encoding?

How do I convert a string to a byte[] in .NET (C#) without manually specifying a specific encoding? I'm going …

c# .net string character-encoding
How to convert UTF-8 byte[] to string?

I have a byte[] array that is loaded from a file that I happen to known contains UTF-8. In some …

c# .net arrays string type-conversion