コード例 #1
0
 /// <summary>
 /// Cast <see cref="string"/> to <see cref="int"/>
 /// </summary>
 /// <param name="str"></param>
 /// <param name="impls"></param>
 /// <returns></returns>
 public static int CastToInt32(this string str, params IConversionImpl <string, int>[] impls) => NumericConv.StringToInt32(str, impls);
コード例 #2
0
 /// <summary>
 /// Cast <see cref="string"/> to <see cref="int"/>
 /// </summary>
 /// <param name="str"></param>
 /// <param name="defaultVal"></param>
 /// <returns></returns>
 public static int CastToInt32(this string str, int defaultVal = default) => NumericConv.StringToInt32(str, defaultVal);