은, 제발 도와주세요C# 샘플 구문 질문
이public class Customer : IDataErrorInfo
{
#region Creation
public static Customer CreateNewCustomer()
{
return new Customer();
}
public static Customer CreateCustomer(
double totalSales,
string firstName,
string lastName,
bool isCompany,
string email)
{
return new Customer
{
TotalSales = totalSales,
FirstName = firstName,
LastName = lastName,
IsCompany = isCompany,
Email = email
};
}
protected Customer() // it is what I asked about
{
}
#endregion // Creation
......
}
답변 해 주신 모든 분들께 감사드립니다. 수락 된 답변을 선택하는 것은 어려웠습니다 (미안하지만 하나 일 수 있음). 이 코드 조각에 대한 나의 의심은 생성 인스턴스 및 각 인스턴스의 특정 목적을위한 여러 생성자의 존재와 관련되어있었습니다. – rem