namespace BillsEntityLib { /// <summary> /// Bills helper /// </summary> public static class BillHelper { /// <summary> /// Converts string status representation to BillStatus enumeration /// </summary> /// <param name="stat">String status</param> /// <returns>Bill's status</returns> public static BillStatus Convert(string stat) { BillStatus status = BillStatus.Empty; switch (stat) { case "Unpaid": status = BillStatus.Unpaid; break; case "Paid": status = BillStatus.Paid; break; case "Empty": status = BillStatus.Empty; break; } return status; } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)