title: Cannot convert source type 'string' to target type 'uint' error in c#
body: <p>I am developing an win-forms application in VS 2010 to retrieve data from <code>Sql Server</code> or <code>MySQL</code>.</p>
  
  <p>In this I am assigning connection sting by using below GUI.</p>
  
  <p><img src="https://i.stack.imgur.com/3TF5q.png" alt="GUI Screenshot"></p>
  
  <p>and adding or modifying MySQL connection string of destination by below function.</p>
  
  <pre><code>    private static void CreateDConnectionString(string server,string port, string dataBase, string userId, string password)
      {
          try
          {
              var connectionBuilder = new MySqlConnectionStringBuilder()
              {
  
                  Server = server,
                  Port = port,
                  Database = dataBase,
                  UserID = userId,
                  Password = password
              };
              //Open the app.config for modification
              var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
              //Retreive connection string setting
              var connectionString = config.ConnectionStrings.ConnectionStrings["DConnection"];
              if (connectionString == null)
              {
                  //Create connection string if it doesn't exist
                  config.ConnectionStrings.ConnectionStrings.Add(new ConnectionStringSettings
                  {
                      Name = "DConnection",
                      ConnectionString = connectionBuilder.ConnectionString,
                      ProviderName = "MySql.Data.MySqlClient"
                  });
              }
              else
              {
                  //Only modify the connection string if it does exist
                  connectionString.ConnectionString = connectionBuilder.ConnectionString;
              }
              //Save changes in the app.config
              config.Save(ConfigurationSaveMode.Modified);
          }
          catch (Exception)
          {
              MessageBox.Show(@"Need to work on configration");
              throw;
          }
      }
  </code></pre>
  
  <p>In this function on code</p>
  
  <pre><code>Port = port,
  </code></pre>
  
  <p>I am getting error that Cannot convert source type <code>string</code> to target type <code>uint</code></p>