Change it to
public static void Search(string name, string city = "Tehran", int age = 21)
{
MessageBox.Show(String.Format("Name = {0} - Age = {1} - City = {2}",
name, age, city));
}
Now you can use it as
Search("Mahdi", "Mashhad");
Optional parameters are defined at the end of the parameter list, after any required parameters. http://msdn.microsoft.com/en-us/library/dd264739.aspx