You need to try something like this:
using (SqlConnection con = new SqlConnection(@"Data Source=yourServerName\SQLEXPRESS;Integrated Security=True;"))
{
SqlCommand cmd = new SqlCommand("CREATE DATABASE MyDataBase",con);
con.Open();
cmd.ExecuteNonQuery();
}
Hope this helps