Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class Entity
{
public string Type { get; set; }
public int GetNewValueBasedOnType(int newValue)
{
int returnValue;
switch (Type)
{
case "Type0":
returnValue = newValue;
break;
case "Type1":
returnValue = newValue * 2;
break;
case "Type2":
returnValue = newValue * 3;
break;
}
return newValue;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment