rajeshnrh

rajeshnrh

  • 1.5k
  • 659
  • 203

C# Initialize a Class with Array of another complex type

Jun 24 2022 9:33 AM

Team, in C# don;'t know how to initialize below SiteExternalId Class with some dummy values, help me

public class SiteExternalId
{
public SiteExternalIdItem[] Item { get; set; }
}

public class SiteExternalIdItem
{
public ExternalTypeCd ExternalIdTypeCd { get; set; }

public string SiteNumber { get; set; }
}

public class ExternalTypeCd
{
public string ExternalIdTypeName { get; set; }

public string SiteCode { get; set; }
}


Answers (4)