GetCurrentCulture() публичный статический Метод

Get current system culture
public static GetCurrentCulture ( ) : CultureInfo
Результат System.Globalization.CultureInfo
Пример #1
0
 /// <summary>
 /// <para>Convert string date to datetime</para>
 /// <para>Return BaseDateTimeExtensions.GetCurrentDateTime() on error</para>
 /// </summary>
 /// <param name="strValue">string to convert</param>
 /// <returns>datetime</returns>
 public static DateTime TryParseDate(this string strValue)
 {
     return(strValue.TryParseDate(BaseDateTimeExtensions.GetCurrentDateTime(),
                                  BaseDateTimeExtensions.GetCurrentCulture(),
                                  BaseDateTimeExtensions.GetDefaultToDateDateTimeStyles()));
 }
Пример #2
0
 /// <summary>
 /// Test if string value is a valid date value
 /// </summary>
 /// <param name="strValue">string value</param>
 /// <returns>true/false</returns>
 public static bool IsValidDate(this string strValue)
 {
     return(strValue.IsValidDate(
                BaseDateTimeExtensions.GetCurrentCulture(),
                BaseDateTimeExtensions.GetDefaultToDateDateTimeStyles()));
 }