Tags: .NET

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 →

CulturInfo not working as expected in C#

Benjamin Perkins C#

I have started working with Globalization and Localization functionality for a system I am building. I could not understand why, when I wanted to get the intellisense for the class that nothing showed up. After some time I decided to use the full name of the class to get to the methods like this: I […]

Read More →

Dynamic Type in C#, in comparison to var Type

Benjamin Perkins C#

Knowing the type of variable you are working with in C# and while programming in general is pretty important. You can’t add a double and an integer together and get an integer, without converting it. If you attempt to do this the compiler will throw an exception and you will not be able to run […]

Read More →

Interface in C#

Benjamin Perkins C#

An interface is like a contract. When a person signs a contract they are agreeing to perform in adherence to its’ contents. The person can take any action which is not specifically identified in the contract or build on top of the agreements within it. An interface has a similar concept. In this example I […]

Read More →

Hashing with Cryptography and SHA in C#

Benjamin Perkins C#

Disclaimer: Security is a very important aspect, not only for a computer system, but for an entire organization and/or company. Different types of organizations store different types of data which have different types of security requirements. My suggestion is to always consult a security expert with experience in your domain prior to implementing a security […]

Read More →