SimpleFramework.Xml.Core.Section.Add C# (CSharp) 메소드

Add() 공개 메소드

public Add ( Paragraph paragraph ) : void
paragraph Paragraph
리턴 void
         public void Add(Paragraph paragraph) {
            list.Add(paragraph);
         }
      }

Usage Example

예제 #1
0
    //public String GetContent() {
    //   return text;
    //}
    //public void SetContent(String text) {
    //   this.text = text;
    //}
 public void TestStatic() {
    Persister persister = new Persister();
    Document document = new Document("Secret Document");
    Section section = new Section("Introduction");
    Paragraph first = new Paragraph();
    Paragraph second = new Paragraph();
    Paragraph third = new Paragraph();
    first.setContent("First paragraph of document");
    second.setContent("Second paragraph in the document");
    third.setContent("Third and readonly paragraph");
    section.Add(first);
    section.Add(second);
    section.Add(third);
    document.Add(section);
    persister.write(document, System.out);
    validate(persister, document);
 }