namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter04.Listing04_52
{
    public class EmailDomain
    {
        public static void Main()
        {
            string email;
            bool insideDomain = false;

            System.Console.WriteLine("Wprowad adres e-mail: ");

            email = System.Console.ReadLine();

            System.Console.Write("Domena podanego adresu to: ");

            // Sprawdzenie wszystkich liter w adresie e-mail.
            foreach (char letter in email)
            {
                if(!insideDomain)
                {
                    if(letter == '@')
                    {
                        insideDomain = true;
                    }
                    continue;
                }

                System.Console.Write(letter);
            }
        }
    }
}