Tags: C#

Targeting a specific version of the .NET Framework

Benjamin Perkins C#

I find numerous opinions and understandings about side-by-side and in-place installations of the .NET Framework.  Here is my favorite explanation of this “.NET Versioning and Multi-Targeting – .NET 4.5 is an in-place upgrade to .NET 4.0”.  I also link to that same article in one of my IIS labs here, “Lab 5: Basic and Advanced […]

Read More →

What is the current .NET version on an Azure App Service

Azure App Service Benjamin Perkins

I have an App Service here (currentdotnetversion) that shows the output of the current (when I wrote this article) .NET version using C# code.  Here is a partial code snippet: protected void Page_Load(object sender, EventArgs e) {    const string subkey = @”SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\”;    using (RegistryKey ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine,           RegistryView.Registry32).OpenSubKey(subkey))    { […]

Read More →

Add Key Value Pairs to a Combobox using WPF and C#

Benjamin Perkins C#

It’s pretty easy to populate and read from a ComboBox when the selected item is the same as the selected value. I.e. just simply use: [sourcecode language=”csharp” padlinenumbers=”true”] string selection = comboBox1.SelectedValue.ToString(); [/sourcecode] However, when you need the value to be different from the item (I.e. display value). Perhaps you want to display the Month […]

Read More →