sdk/dotnet/src/Microsoft.Datasync.Client/Utils/Arguments.cs
/// <summary>
/// Returns the parameter if it is positive.
/// </summary>
/// <param name="param">The parameter to validate.</param>
/// <param name="paramName">The name of the parameter.</param>
/// <returns>The parameter, if valid.</returns>
/// <exception cref="ArgumentException">if the parameter is invalid.</exception>
Returns the parameter if it is positive.
Returns the parameter if it is positive .
public static int IsPositiveInteger(int param, string paramName)
        {
            if (param <= 0)
            {
                throw new ArgumentException($"Parameter '{paramName}' must be a positive integer.", paramName);
            }
            return param;
        }
public static int IsPositiveInteger ( int param , string paramName ) { if ( param <= 0 ) { throw new ArgumentException ( $" Parameter ' { paramName } ' must be a positive integer. " , paramName ) ; } return param ; }
Returns the parameter if it is positive.
Returns the parameter if it is positive .
The parameter, if valid.
The parameter if valid .
if the parameter is invalid.
if the parameter is invalid .
param
int
The parameter to validate.
The parameter to validate .
paramName
string
The name of the parameter.
The name of the parameter .