using System.Globalization;
using System.ComponentModel;
public static void Main()
var sdate = "2021-04-14T00:00:00+00:00";
var date = DateTime.Parse(sdate, CultureInfo.GetCultureInfo("pt-BT"));
public static string GetDescription(Enum e)
string name = Enum.GetName(type, e);
FieldInfo field = type.GetField(name);
if (field != null && Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) is DescriptionAttribute attr)
public static T GetValue<T>(string v, IFormatProvider formatProvider)
if (string.IsNullOrEmpty(v))
return (T)Convert.ChangeType(v, typeof(T), formatProvider);
public static string CapitalizeFirstWord(string text)
if (!string.IsNullOrEmpty(text))
text = text.Substring(0, 1).ToUpper(CultureInfo.CurrentCulture) + text.Substring(1, text.Length - 1).ToLower(CultureInfo.CurrentCulture);
public enum InternalAuthOptions