제목을 더 구체적으로 표현할 수 없다는 것에 사과하지만 예제를 통해 설명 할 수 있습니다.XML 직렬화 구조
나는 다음과 같은 XML로 직렬화 클래스를 구축하기 위해 노력하고있어
<Customize>
<Content></Content>
<Content></Content>
<!-- i.e. a list of Content -->
<Command></Command>
<Command></Command>
<Command></Command>
<!-- i.e. a list of Command -->
</Customize>
내 C 번호는 다음과 같습니다
[XmlRoot]
public Customize Customize { get; set; }
및 그러나
public class Customize
{
public List<Content> Content { get; set; }
public List<Command> Command { get; set; }
}
, 이것은 생산 (로 해야한다), 다음 :
<Customize>
<Content>
<Content></Content>
<Content></Content>
</Content>
<Command>
<Command></Command>
<Command></Command>
<Command></Command>
</Command>
</Customize>
원하는 xml을 달성하는 데 도움이되는 XML 직렬화 속성이 있습니까? 아니면 클래스를 작성하는 다른 방법을 찾아야합니까?
당신이 직렬화 코드를 추가 할 수 있습니까? – Styxxy