samedi 28 février 2015

Format string not working in C# getter

I need to format data string from format "dd.mm.yyyy" to be "yyyymmdd". I'm trying to do this following way, but this return unchanged string.



private string _pe1;
public string PassportEnd1 {
get { return String.Format("{0:yyyymmdd}", this._pe1); }
set { this._pe1 = value; }
}

Aucun commentaire:

Enregistrer un commentaire