Either:
string sample = "mymail@gmail.com";
string[] parts = sample.Split('@');
Or:
string sample = "mymail@gmail.com";
string localAddress = sample.SubString(0, sample.IndexOf('@'));
The first will break it into two parts:
"mymail"
"gmail.com"
The second will remove the "@" and everything to it's right.