Literally give the SMTP Host name: the outgoing mail server reference you would put into an outlook account setup:
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.talktalk.net");
"i used this code..."
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.Subject = "This is the Subject line";
message.From = new System.Net.Mail.MailAddress("email@example.com");
message.Body = "hi";
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com");
"it showing error at last line ya"
The chances are that the error is actually caused because gmail want's authentication - it needs to know you are you, and not me trying to send messages from your account. This means you need to set the Credentials field.
Have a look at this tip: it contains a generic email routine: Sending an Email in C# with or without attachments: generic routine.