static private TryParse ( String s, DateTimeFormatInfo dtfi, DateTimeStyles styles, DateTime &result ) : bool | ||
s | String | |
dtfi | DateTimeFormatInfo | |
styles | DateTimeStyles | |
result | DateTime | |
Résultat | bool |
public static bool TryParse(ReadOnlySpan <char> input, out DateTimeOffset result) { bool parsed = DateTimeParse.TryParse(input, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None, out DateTime dateResult, out TimeSpan offset); result = new DateTimeOffset(dateResult.Ticks, offset); return(parsed); }
public static bool TryParse(ReadOnlySpan <char> input, IFormatProvider?formatProvider, DateTimeStyles styles, out DateTimeOffset result) { styles = ValidateStyles(styles, nameof(styles)); bool parsed = DateTimeParse.TryParse(input, DateTimeFormatInfo.GetInstance(formatProvider), styles, out DateTime dateResult, out TimeSpan offset); result = new DateTimeOffset(dateResult.Ticks, offset); return(parsed); }
public static bool TryParse(string input, out DateTimeOffset result) { TimeSpan span; System.DateTime time; bool flag = DateTimeParse.TryParse(input, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None, out time, out span); result = new DateTimeOffset(time.Ticks, span); return(flag); }
public static bool TryParse([NotNullWhen(true)] string?input, out DateTimeOffset result) { bool parsed = DateTimeParse.TryParse(input, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None, out DateTime dateResult, out TimeSpan offset); result = new DateTimeOffset(dateResult.Ticks, offset); return(parsed); }
public static bool TryParse(string input, IFormatProvider formatProvider, DateTimeStyles styles, out DateTimeOffset result) { TimeSpan span; System.DateTime time; styles = ValidateStyles(styles, "styles"); bool flag = DateTimeParse.TryParse(input, DateTimeFormatInfo.GetInstance(formatProvider), styles, out time, out span); result = new DateTimeOffset(time.Ticks, span); return(flag); }
public static Boolean TryParse(String input, out DateTimeOffset result) { TimeSpan offset; DateTime dateResult; Boolean parsed = DateTimeParse.TryParse(input, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None, out dateResult, out offset); result = new DateTimeOffset(dateResult.Ticks, offset); return(parsed); }
public static Boolean TryParse(String input, IFormatProvider formatProvider, DateTimeStyles styles, out DateTimeOffset result) { styles = ValidateStyles(styles, "styles"); TimeSpan offset; DateTime dateResult; Boolean parsed = DateTimeParse.TryParse(input, DateTimeFormatInfo.GetInstance(formatProvider), styles, out dateResult, out offset); result = new DateTimeOffset(dateResult.Ticks, offset); return(parsed); }
public static bool TryParse([NotNullWhen(true)] string?input, IFormatProvider?formatProvider, DateTimeStyles styles, out DateTimeOffset result) { styles = ValidateStyles(styles, nameof(styles)); if (input == null) { result = default; return(false); } bool parsed = DateTimeParse.TryParse(input, DateTimeFormatInfo.GetInstance(formatProvider), styles, out DateTime dateResult, out TimeSpan offset); result = new DateTimeOffset(dateResult.Ticks, offset); return(parsed); }
public static Boolean TryParse(String input, IFormatProvider formatProvider, DateTimeStyles styles, out DateTimeOffset result) { styles = ValidateStyles(styles, nameof(styles)); if (input == null) { result = default(DateTimeOffset); return(false); } TimeSpan offset; DateTime dateResult; Boolean parsed = DateTimeParse.TryParse(input.AsReadOnlySpan(), DateTimeFormatInfo.GetInstance(formatProvider), styles, out dateResult, out offset); result = new DateTimeOffset(dateResult.Ticks, offset); return(parsed); }
public static bool TryParse(string s, IFormatProvider provider, DateTimeStyles styles, out DateTime result) { DateTimeFormatInfo.ValidateStyles(styles, "styles"); return(DateTimeParse.TryParse(s, DateTimeFormatInfo.GetInstance(provider), styles, out result)); }
public static bool TryParse(string s, out DateTime result) { return(DateTimeParse.TryParse(s, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None, out result)); }