Created
September 28, 2017 10:12
-
-
Save NMZivkovic/cb89e28169233c394e063b6ac2d6a5d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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