コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="arr"></param>
 /// <param name="idx"></param>
 /// <param name="defVal"></param>
 /// <returns></returns>
 public static sbyte GetValueOrDefault(this string[] array, int index, sbyte defVal)
 {
     return(StringExtensions.ToSByte(StringArrayExtensions.GetValueOrDefault(array, index, string.Empty), defVal));
 }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="arr"></param>
 /// <param name="idx"></param>
 /// <param name="defVal"></param>
 /// <returns></returns>
 public static ushort GetValueOrDefault(this string[] array, int index, ushort defVal)
 {
     return(StringExtensions.ToUInt16(StringArrayExtensions.GetValueOrDefault(array, index, string.Empty), defVal));
 }
コード例 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="array"></param>
 /// <param name="index"></param>
 /// <param name="defVal"></param>
 /// <returns></returns>
 public static char GetValueOrDefault(this string[] array, int index, char defVal)
 {
     return(StringExtensions.ToChar(StringArrayExtensions.GetValueOrDefault(array, index, string.Empty), defVal));
 }
コード例 #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="array"></param>
 /// <param name="index"></param>
 /// <param name="defVal"></param>
 /// <returns></returns>
 public static bool GetValueOrDefault(this string[] array, int index, bool defVal)
 {
     return(StringExtensions.ToBoolean(StringArrayExtensions.GetValueOrDefault(array, index, string.Empty), defVal));
 }
コード例 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="array"></param>
 /// <param name="idx"></param>
 /// <param name="defVal"></param>
 /// <returns></returns>
 public static float GetValueOrDefault(this string[] array, int index, float defVal)
 {
     return(StringExtensions.ToSingle(StringArrayExtensions.GetValueOrDefault(array, index, string.Empty), defVal));
 }
コード例 #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="array"></param>
 /// <param name="idx"></param>
 /// <param name="defVal"></param>
 /// <returns></returns>
 public static decimal GetValueOrDefault(this string[] array, int index, decimal defVal)
 {
     return(StringExtensions.ToDecimal(StringArrayExtensions.GetValueOrDefault(array, index, string.Empty), defVal));
 }
コード例 #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="array"></param>
 /// <param name="idx"></param>
 /// <param name="defVal"></param>
 /// <returns></returns>
 public static long GetValueOrDefault(this string[] array, int index, long defVal)
 {
     return(StringExtensions.ToInt64(StringArrayExtensions.GetValueOrDefault(array, index, string.Empty), defVal));
 }