Exemple #1
0
        public override string Format(Unicorn u)
        {
            var output =
                $"{{ 'Name': '{u.Name}', " +
                $"'CornCentimeters': {u.CornCentimeters}, " +
                $"'Birth': {u.Birth.ToString("yyyy-MM-dd")}, " +
                $"'IsWild': {u.IsWild} }}";

            return(output);
        }
Exemple #2
0
        public override string Format(Unicorn u)
        {
            var output =
                $"Name={u.Name};" +
                $"CornCentimeters={u.CornCentimeters};" +
                $"Birth={u.Birth.ToString("yyyy-MM-dd")};" +
                $"IsWild={u.IsWild}";

            return(output);
        }
Exemple #3
0
 public abstract string Format(Unicorn u);