public static void Main()
string strItemCode = "sony-dvd-062019";
int firstDash = strItemCode.IndexOf("-");
int secondDash = strItemCode.IndexOf("-", firstDash + 1);
string month = strItemCode.Substring(secondDash + 1, 2);
int monthIndex = strItemCode.IndexOf(month);
string year = strItemCode.Substring(monthIndex + 2, 4);
string[] x = strItemCode.Split('-');
string manufacturer = x[0];
string output = String.Format("Manufacturer: {0}, Product: {1}, Month: {2}, Year: {3}", manufacturer, product, month, year);
Console.WriteLine(output);
Console.WriteLine("Enter an email address: ");
string email = Console.ReadLine();
Console.WriteLine("Not a valid email. Please try again.");
Console.WriteLine("Enter an email address: ");
email = Console.ReadLine();
int usernameIndex = email.IndexOf("@");
string username = email.Substring(0, usernameIndex);
Console.WriteLine(username);
string domain = email.Substring(usernameIndex + 1);
Console.WriteLine(domain);