public string GetCardNumber() { string[] cn = CardNumber.Split(' '); cn[1] = "****"; cn[2] = "****"; return(string.Format("{0} {1} {2} {3}", cn[0], cn[1], cn[2], cn[3])); }
public string GetCardNumber() { string[] newCardNumber = CardNumber.Split(' '); newCardNumber[1] = "****"; newCardNumber[2] = "****"; return($"{newCardNumber[0]} {newCardNumber[1]} {newCardNumber[2]} {newCardNumber[3]}"); }