귀하의 방법은 ElectronicRecordAppellateCase
클래스의 인스턴스를 반환하는 데 동의합니다. 결과가 인 경우 결과가 인 경우 결과가 좋을 것 같습니다.
public ElectronicRecordAppellateCase CreateXml()
{
ElectronicRecordAppellateCase output=new ElectronicRecordAppellateCase();
if(someVariableAlreadyDefined>otherVariable)
{
//do something useful
return output;
}
// Not returning anything if the if condition is not true!!!!
}
솔루션 : 당신이 방법에서 유효한 반환 값을 반환하고 있는지 확인하십시오.
public ElectronicRecordAppellateCase CreateXml()
{
ElectronicRecordAppellateCase output=new ElectronicRecordAppellateCase();
if(someVariableAlreadyDefined>otherVariable)
{
return output;
}
return null; //you can return the object here as needed
}
이 방법 자체가 아니라 정의 ... – walther
확인 값을 반환하지 그것은 PO하지 않으면 당신이 게시 한 것을 통해 말할 수 있습니다. 오류는 아무 것도 반환하지 않는 코드 경로가 있음을 의미합니다 ('else', 'case'등이 누락되었습니다). – Oded
제목을 편집했습니다. "[제목에"태그 "가 포함되어 있어야합니까?] (http://meta.stackexchange.com/questions/19190/)"합의가 "아니오, 그렇지 않아야합니다"로 표시되어야합니다. –