Sunday, November 16, 2014

Method to format Currency

 public static string GetCurrency(object value)
        {
            string currency = string.Empty;
            decimal amount;
            if (value != null && Decimal.TryParse(value.ToString(), out amount))
            {
                currency = amount.ToString("c");
            }
            return currency;
        }

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...