It has little to do with the client side language (c#) or algorithm.
In general you have two possibilities to send out SMS:
1) with a GSM device (phone for example) connected to your machine: see:
http://www.developershome.com/sms/howToSendSMSFromPC.asp[
^]. You open the COM port and send out commands.
Pro: relatively cheap at the start
Con: low sending rate; can be expensive depending on the subscription you have
2) Trough an SMS gateway service, like this one:
http://www.intellisms.co.uk/sms-gateway/developer/[
^], since they have a free and ready-to-use .net component for sending out messages. But you should look for the best alternative for your needs.