Top ".net" questions

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

How to export non-exportable private key from store

I need to export private key from Windows store. What should I do if the key is marked as non-exportable? …

.net encryption bouncycastle rsacryptoserviceprovider
How to get CPU temperature?

I need to gather some system's information for the application I'm developing. The memory available and the CPU load are …

c# .net wmi
How do I wait until Task is finished in C#?

I want to send a request to a server and process the returned value: private static string Send(int id) { …

c# .net task task-parallel-library wait
How do I trap ctrl-c (SIGINT) in a C# console app

I would like to be able to trap CTRL+C in a C# console application so that I can carry …

c# .net console
Serialize Property as Xml Attribute in Element

I have the following class: [Serializable] public class SomeModel { [XmlElement("SomeStringElementName")] public string SomeString { get; set; } [XmlElement("SomeInfoElementName")] public int …

c# .net xml xml-serialization
Close and Dispose - which to call?

Having read the threads Is SqlCommand.Dispose enough? and Closing and Disposing a WCF Service I am wondering for classes …

.net
How to append one DataTable to another DataTable

I would like to append one DataTable to another DataTable. I see the DataTable class has two methods; "Load(IDataReader)" …

c# .net vb.net datatable
Best way to encode text data for XML

I was looking for a generic method in .Net to encode a string for use in an Xml element or …

.net xml encoding .net-2.0
Detect Windows version in .net

How can I detect the Windows OS versions in .net? What code can I use?

c# .net windows operating-system
The type or namespace name 'Entity' does not exist in the namespace 'System.Data'

I'm using WS class and it gave me error when I run the application: The type or namespace name 'Entity' …

c# asp.net .net web-services entity-framework-4.1