I'm very new to c# so please excuse my lack of knowledge. I'm just trying to check the following:
- "CardNumberLength" = 16
- "CardPINLength" = 3
- "CardNameHasSpace" 0 I don't want to use an if else statement, is there another way?
The code:
public bool Validate()
{
CardNumberLength = Convert.ToString(GetCardNumber()).Length;
CardPINLength = Convert.ToString(GetCardPIN()).Length;
CardNameHasSpace = GetCardName().IndexOf(" ");
}