Top ".net" questions

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

Write to Windows Application Event Log

Is there a way to write to this event log: Or at least, some other Windows default log, where I …

c# .net windows logging event-log
How to check if IEnumerable is null or empty?

I love string.IsNullOrEmpty method. I'd love to have something that would allow the same functionality for IEnumerable. Is there …

c# .net linq collections ienumerable
What is C# analog of C++ std::pair?

I'm interested: What is C#'s analog of std::pair in C++? I found System.Web.UI.Pair class, but …

c# .net data-structures std-pair base-class-library
How can I wrap text in a label using WPF?

I have a TextBox and a Label. After clicking a button, I execute the following code: label1.Content = textbox1.Text; …

c# .net wpf label word-wrap
BadImageFormatException. This will occur when running in 64 bit mode with the 32 bit Oracle client components installed

I am getting this error while on of my .Net application are trying to make a connection to oracle database. …

.net oracle oracle11g
Most useful NLog configurations

What are the best or most useful configurations for logging with NLog? (These can be simple or complex, as long …

.net logging mono nlog
How to change the color of progressbar in C# .NET 3.5?

I'd like to do two things on my progress bar. Change the green colour to red. Remove the blocks and …

c# .net winforms .net-3.5
HashSet vs. List performance

It's clear that a search performance of the generic HashSet<T> class is higher than of the generic …

.net performance collections list hash
Can't specify the 'async' modifier on the 'Main' method of a console app

I am new to asynchronous programming with the async modifier. I am trying to figure out how to make sure …

c# .net asynchronous console-application
How to find the .NET framework version of a Visual Studio project?

I have a project in Visual Studio. How can I find out which .NET Framework version it's for?

.net version