How to send a free SMS from C#

I used the following code to send a free SMS from C#, by using the messagebird REST service.   using System; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; namespace DocumentenService.Client { public class Program { public static void Main(string[] args) { SendSms().Wait(); // Wait for the user to close this application. …

How to rename an user in Active Directory with C#

  If you want to rename an user in Active Directory by using C#, you can use the following code: using System; using System.Collections.Generic; using System.DirectoryServices; using System.DirectoryServices.AccountManagement; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { try { Console.WriteLine(“This application will …

Reliable bring external process window to foreground with C#

If you want to reliable bring the main window of an external process to the foreground in C#, use the “simulate alt key” technique found at: http://stackoverflow.com/questions/10740346/setforegroundwindow-only-working-while-visual-studio-is-open Just start Notepad, then run the following test in Visual Studio. It should bring Notepad as a maximized window in the foreground. namespace …