Top ".net" questions

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

How to send email to multiple address using System.Net.Mail

I have smtp email functionality. it works for single address but has problem in multiple address. i am passing multiple …

c# .net smtp
Get the previous month's first and last day dates in c#

I can't think of an easy one or two liner that would get the previous months first day and last …

c# .net datetime date
C# List<> Sort by x then y

Similar to List<> OrderBy Alphabetical Order, we want to sort by one element, then another. we want to …

c# .net sorting
WPF global exception handler

Sometimes, under not reproducible circumstances, my WPF application crashes without any message. The application simply close instantly. Where is the …

c# .net wpf exception exception-handling
What does InitializeComponent() do, and how does it work in WPF?

What does InitializeComponent() do, and how does it work in WPF? In general first, but I would especially be interested …

c# .net wpf attached-properties
Measuring code execution time

I want to know how much time a procedure/function/order takes to finish, for testing purposes. This is what …

c# .net vb.net datetime timespan
Purpose of Activator.CreateInstance with example?

Can someone explain Activator.CreateInstance() purpose in detail?

c# .net reflection
Why there is no ForEach extension method on IEnumerable?

Inspired by another question asking about the missing Zip function: Why is there no ForEach extension method in the Enumerable …

c# .net vb.net extension-methods
Get first element from a dictionary

I have the following declaration: Dictionary<string, Dictionary<string, string>> like = new Dictionary<string, Dictionary&…

c# asp.net .net .net-3.5
Getting the PublicKeyToken of .Net assemblies

What is the simplest way to find the Public-Key-Token of an assembly? The simplest way I can think of would …

.net visual-studio visual-studio-2010 public-key