Create an SQL Server Login using C#

I have SQL Server Express 2008 installed in my computer. I need to create a Login to this using C# code. That is, I need to implement the same functionality that is performed when you create a Login to SQL Server using the wizard.
Also I need the program to be able to create a login to not just SQL EXpress 2008, but any other version of both Express and Standart editions.

Assembly settings are used where the type 'Microsoft.SqlServer.Management.Sdk.Sfc.ISfcValidate' is not referenced. Please add a reference to the Assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'

Also, how to I used those Transact-SQL statements to create a login. I need to create a Windows based login. How do I run those?

Hi. so this is actually a continuation from another question of mine[Here](https://www.daniweb.com/programming/software-development/threads/506795/dynamically-add-values-into-datagridview-cell-from-listbox-vb2010) but i was advised to start a new thread as the original question …

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...