Skip to content

Commit

Permalink
Mark some methods as Obsolete (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
slozier authored Feb 28, 2020
1 parent 5a356aa commit 4d72535
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Src/Microsoft.Dynamic/Utils/StringUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,27 @@ public static bool TryParseDouble(string s, NumberStyles style, IFormatProvider
return Double.TryParse(s, style, provider, out result);
}

[Obsolete("Use int.TryParse")]
public static bool TryParseInt32(string s, out int result) {
return Int32.TryParse(s, out result);
}

[Obsolete("Use DateTime.TryParseExact")]
public static bool TryParseDateTimeExact(string s, string format, IFormatProvider provider, DateTimeStyles style, out DateTime result) {
return DateTime.TryParseExact(s, format, provider, style, out result);
}

[Obsolete("Use DateTime.TryParseExact")]
public static bool TryParseDateTimeExact(string s, string[] formats, IFormatProvider provider, DateTimeStyles style, out DateTime result) {
return DateTime.TryParseExact(s, formats, provider, style, out result);
}

[Obsolete("Use DateTime.TryParse")]
public static bool TryParseDate(string s, IFormatProvider provider, DateTimeStyles style, out DateTime result) {
return DateTime.TryParse(s, provider, style, out result);
}

// Aims to be equivalent to Culture.GetCultureInfo for Silverlight
[Obsolete("Use CultureInfo.GetCultureInfo")]
public static CultureInfo GetCultureInfo(string name) {
return CultureInfo.GetCultureInfo(name);
}
Expand Down

0 comments on commit 4d72535

Please sign in to comment.