src/openSourceC.DotNetLibrary.Core/Extensions/StringBuilderExtensions.cs
/// <summary>
///		Appends a string representation of an enumerator to the parameters collection.
/// </summary>
/// <param name="stringBuilder">The <see cref="StringBuilder"/> object.</param>
/// <param name="key">The query-string key.</param>
/// <param name="value">The query-string value.</param>
/// <param name="defaultValue">The query-string default value, used if value is null or
///		empty. (optional)</param>
/// <returns>
///		The modified <see cref="StringBuilder"/> object.
/// </returns>
Appends a string representation of an enumerator to the parameters collection.
Appends a string representation of an enumerator to the parameters collection .
public static StringBuilder AppendQueryStringPair<TEnum>(this StringBuilder stringBuilder, string key, TEnum? value, TEnum? defaultValue = null)
			where TEnum : struct, Enum
		{
			if ((value ??= defaultValue).HasValue)
			{
				return stringBuilder.AppendQueryStringPair(key, value!.Value.ToString().ToLower());
			}
			return stringBuilder;
		}
public static StringBuilder AppendQueryStringPair < TEnum > ( this StringBuilder stringBuilder , string key , TEnum ? value , TEnum ? defaultValue = null ) where TEnum : struct , Enum { if ( ( value ??= defaultValue ) . HasValue ) { return stringBuilder . AppendQueryStringPair ( key , value ! . Value . ToString ( ) . ToLower ( ) ) ; } return stringBuilder ; }
Appends a string representation of an enumerator to the parameters collection.
Appends a string representation of an enumerator to the parameters collection .
The modified  object.
The modified object .
StringBuilder
this
key
string
The query-string key.
The query - string key .
value
TEnum?
The query-string value.
The query - string value .
defaultValue
TEnum?
The query-string default value, used if value is null or
empty. (optional)
The query - string default value used if value is null or empty . ( optional )
stringBuilder
None