namespace Welcome
{
sealed class Alex
{
public string UserName;
public string Name;
public int Age;
public string School;
public string Major;
public string[]? Interests;
public Alex()
{
UserName = "brittain9";
Name = "Alexander Brittain";
Age = 21;
School = "University of Texas at Austin";
Major = "Management Information Systems";
Interests ??= (new string[]
{ "Open Source", "DIY", "Eating", "Cycling", "Architecture", "Combat Sports" });
}
public override string ToString()
{
string str = $"Hello! My name is {Name}.\nI am a {Age} year old {Major} major at {School}.\n";
if (Interests != null)
{
str += "\nMy interests include:\n";
foreach (var interest in Interests)
{
str += $" - {interest}\n";
}
}
str += "\nCheck out my website and feel free to reach out on LinkedIn or my email.";
return str;
}
public static void Main()
{
Alex a = new Alex();
Console.WriteLine(a);
}
}
}