Category Archives: C#

C# Snippets

C#: Import a rsa public key generated by openssl

Hi,

the C# (.NET 4) RSACryptoServiceProvider->ImportCspBlob methode has the ability to import RSA (public) keys.
Continue reading C#: Import a rsa public key generated by openssl

Advertisment to support michlstechblog.info

Windows: Start WiFi/WLAN Network Connection Dialog from command line or C#

Hi,

to start the Windows Wireless Connection Dialog from a command shell use the following command line
Continue reading Windows: Start WiFi/WLAN Network Connection Dialog from command line or C#

Windows: Change Password Utility

Hi,

in Active Directory Domain environment you have to frequently change your password.

The default Windows methods usually does not support clipboard operations. So you have to enter your new password two times and depending on your method your old password too 🙁 .
Continue reading Windows: Change Password Utility

Windows: Recording Audio from the Audio loopback device

Hi,

for learning C# I have created a sample project. I choose the NAudio library to play around with sound interfaces in Windows. Starting from this point the C# project grows :-).
Continue reading Windows: Recording Audio from the Audio loopback device

C#: Get description attribute from an enum value

Hi,

in this post I will show how to read a description attribute of an enum value by reflection. Let us assume we have a enum linke this

public enum MetalBands {
	[DescriptionAttribute("This is Metallica from CA")]
	Metallica,
	[DescriptionAttribute("This is Slayer from CA")]
	Slayer,
	[DescriptionAttribute("This is Overkill from NY")]
	Overkill
};

Continue reading C#: Get description attribute from an enum value