Skip to content

Instantly share code, notes, and snippets.

@IntegerMan

IntegerMan/Duplication.cs

Last active Sep 16, 2019
Embed
What would you like to do?
// Associates Degree
if (resume.HasAssociatesDegree)
{
try
{
resume.AssociatesDegreeScore = CalculateAssociatesDegreeScore();
}
catch (InvalidOperationException ex)
{
Console.WriteLine($"Could not calculate associates degree score: {ex.Message}");
resume.AssociatesDegreeScore = 0;
}
}
else
{
resume.AssociatesDegreeScore = 0;
}
// Bachelors Degree
if (resume.HasBachelorsDegree)
{
try
{
resume.BachelorsDegreeScore = CalculateBachelorsDegreeScore();
}
catch (InvalidOperationException ex)
{
Console.WriteLine($"Could not calculate bachelors degree score: {ex.Message}");
resume.BachelorsDegreeScore = 0;
}
}
else
{
resume.BachelorsDegreeScore = 0;
}
// Masters Degree
if (resume.HasMastersDegree)
{
try
{
resume.MastersDegreeScore = CalculateMastersDegreeScore();
}
catch (InvalidOperationException ex)
{
Console.WriteLine($"Could not calculate masters degree score: {ex.Message}");
resume.MastersDegreeScore = 0;
}
}
else
{
resume.MastersDegreeScore = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment