src/openSourceC.DotNetLibrary.Data/Data/DbParamsBase.cs
/// <summary>
///		Return the value of a parameter that is of a type representing a timespan value.
/// </summary>
///	<param name="parameterName">The name of the parameter.</param>
///	<returns>Returns the value of the parameter as a nullable <see cref="DateTime"/>.</returns>
Return the value of a parameter that is of a type representing a timespan value.
Return the value of a parameter that is of a type representing a timespan value .
public TimeSpan? GetTimeSpan(string parameterName)
		{
			try
			{
				object? value = GetValue(parameterName);
				return (value == null ? (TimeSpan?)null : ((DateTime)value).TimeOfDay);
			}
			catch (InvalidCastException ex) { throw new InvalidCastException(string.Format(SR.Type_mismatch_on_parameter, NormalizeParameterName(parameterName)), ex); }
		}
public TimeSpan ? GetTimeSpan ( string parameterName ) { try { object ? value = GetValue ( parameterName ) ; return ( value == null ? ( TimeSpan ? ) null : ( ( DateTime ) value ) . TimeOfDay ) ; } catch ( InvalidCastException ex ) { throw new InvalidCastException ( string . Format ( SR . Type_mismatch_on_parameter , NormalizeParameterName ( parameterName ) ) , ex ) ; } }
Return the value of a parameter that is of a type representing a timespan value.
Return the value of a parameter that is of a type representing a timespan value .
Returns the value of the parameter as a nullable .
Returns the value of the parameter as a nullable .
parameterName
string
The name of the parameter.
The name of the parameter .