public static bool TryParseExact(string?s, string?format, IFormatProvider?provider, DateTimeStyles style, out DateTime result) { DateTimeFormatInfo.ValidateStyles(style, nameof(style)); if (s == null || format == null) { result = default; return(false); } return(DateTimeParse.TryParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), style, out result)); }
public static Boolean TryParseDateTimeExact(String value, String format, IFormatProvider provider, DateTimeStyles styles, out DateTime result, out TimeSpan offset) { return(DateTimeParse.TryParseExact(value, format, (DateTimeFormatInfo)provider.GetFormat(typeof(DateTimeFormatInfo)), styles, out result, out offset)); }
public static bool TryParseExact(ReadOnlySpan <char> s, ReadOnlySpan <char> format, IFormatProvider?provider, DateTimeStyles style, out DateTime result) { DateTimeFormatInfo.ValidateStyles(style, nameof(style)); return(DateTimeParse.TryParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), style, out result)); }
public static bool TryParseExact(string s, string format, IFormatProvider provider, DateTimeStyles style, out DateTime2 result) { DateTimeFormatInfo.ValidateStyles(style, "style"); return(DateTimeParse.TryParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), style, out result)); }
public static Boolean TryParseDateTimeExact(String value, String format, IFormatProvider provider, DateTimeStyles styles, out DateTime result) { return(DateTimeParse.TryParseExact(value, format, DateTimeFormatInfo.GetInstance(provider), styles, out result)); }