How To Get Windows Product Key In C#

How To Get Windows Product Key In C#
I wrote a tutorial before months on how to get windows product key in vb.net. Today we are going to do the same thing in c#.

First of all add these namespaces :
using Microsoft.Win32;
using System.Collections;

After that add this function.:

How To Get The Windows Product Key In VB.NET

Let's get our windows product key from vb.net

Add the function below in your codes