What version of the .NET framework is installed on Windows XP, Vista, and 7?

From Wikipedia and MSDN: .NET Framework 1.1: Windows Server 2003 .NET Framework 2.0: Windows Server 2003 R2 .NET Framework 3.0: Windows Vista, Windows Server 2008 .NET Framework 3.5: Windows 7, Windows Server 2008 R2 .NET Framework 4.0: n/a .NET Framework 4.5: Windows 8, Windows Server 2012 .NET Framework 4.5.1: Windows 8.1, Windows Server 2012 R2 … Read more

C# 7 Expression Bodied Constructors

A way to do this is to use a tuple and a deconstruction to allow multiple assignments in one expression: public class Person { public string Name { get; } public int Age { get; } public Person(string name, int age) => (Name, Age) = (name, age); } As of C# 7.1 (introduced with Visual … Read more

Serializing a list of Key/Value pairs to XML

KeyValuePair is not serializable, because it has read-only properties. Here is more information(thanks to Thomas Levesque). For changing the generated name use the [XmlType] attribute. Define your own like this: [Serializable] [XmlType(TypeName=”WhateverNameYouLike”)] public struct KeyValuePair<K, V> { public K Key { get; set; } public V Value { get; set; } }

Does the .Net Framework 4.0 Installer include the .Net Framework 3.5?

The .NET 4.0 installer doesn’t include the .NET framework 3.5. There is some information on this topic in MSDN: The .NET Framework 4 is highly compatible with applications that are built with earlier .NET Framework versions, except for some changes that were made to improve security, standards compliance, correctness, reliability, and performance. The .NET Framework … Read more

Powershell Unload Module… completely

There is a workaround. Open up another instance of PowerShell: PS > powershell PS > [load DLL] PS > [do work] PS > exit After the exit, you’ll be brought back to the instance of PowerShell from which you made this call (assuming you made the powershell call inside and instance of PowerShell). You can … Read more

IIS Application pool PID

On Windows Server 2008 this has changed. in %systemroot%\system32\inetsrv you find the appcmd.exe using appcmd list wp you get a list of all the worker processes and which apppool they are serving. You might need to run this in a shell with Administrator privileges.