Ejemplo n.º 1
0
        public override string ToString()
        {
            string carta = Carta.NumberToCardNumber((int)this.Numero);

            carta += Uteis.GetFirstDisplayNameEnum(Naipe);
            return(carta);
        }
Ejemplo n.º 2
0
        public string ToJson()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("{");
            stringBuilder.Append(Environment.NewLine);
            stringBuilder.AppendFormat("\t\"Numero\":\"{0}\"", this.Numero);
            stringBuilder.Append("," + Environment.NewLine);
            stringBuilder.AppendFormat("\t\"Naipe\":\"{0}\"", Uteis.GetFirstDisplayNameEnum(this.Naipe));
            stringBuilder.Append(Environment.NewLine);
            stringBuilder.Append("}");

            return(stringBuilder.ToString());
        }