매개 변수가 유효한 데이터와 함께 전달되지 않으면 개체의 인스턴스화를 중단하는 가장 좋은 방법입니까?생성자 및 예외 발생
protected Command(string commandKey)
{
if(commandKey == null) throw new ArgumentNullException("commandKey", "Command Key cannot be null as it is required internally by Command");
if(commandKey == "") throw new ArgumentException("Command Key cannot be an empty string");
CommandKey = commandKey;
}
IsNullOrEmpty 메서드에 대한 정보 주셔서 감사합니다! – Chris