Dev2.Exceptions.ThrowArgumentExceptionIfObjectIsNullOrIsEmptyString C# (CSharp) Method

ThrowArgumentExceptionIfObjectIsNullOrIsEmptyString() public static method

public static ThrowArgumentExceptionIfObjectIsNullOrIsEmptyString ( string objectName, object objectValue ) : void
objectName string
objectValue object
return void
        public static void ThrowArgumentExceptionIfObjectIsNullOrIsEmptyString(string objectName, object objectValue)
        {
            ThrowArgumentNullExceptionIfObjectIsNull(objectName, objectValue);

            if (objectValue is string)
            {
                if (string.IsNullOrEmpty(objectValue.ToString()))
                {
                    throw new ArgumentException(FrameworkResources.Exception_ArgumentCannotBeNullOrEmpty, objectName);
                }
            }
        }
    }