Share via


SectionInformation.ForceDeclaration 메서드

정의

연결된 구성 섹션이 구성 파일에 나타나도록 합니다.

오버로드

ForceDeclaration()

연결된 구성 섹션이 구성 파일에 나타나도록 합니다.

ForceDeclaration(Boolean)

연결된 구성 섹션을 구성 파일에 표시하거나 구성 파일에서 기존 섹션을 제거합니다.

설명

구성 섹션은 부모 파일에서 상속될 때 구성 파일에 기록되지 않습니다. 부모 섹션을 자식 구성 파일에 표시하려면 를 로 설정 ForceDeclarationtrue해야 합니다. 이렇게 하면 구성 파일을 한 컴퓨터에서 다른 컴퓨터로 이식할 수 있습니다. 또한 부모 구성 파일을 제어할 수 없는 경우에도 섹션이 있는지 확인할 수 있습니다.

ForceDeclaration()

Source:
SectionInformation.cs
Source:
SectionInformation.cs
Source:
SectionInformation.cs

연결된 구성 섹션이 구성 파일에 나타나도록 합니다.

public:
 void ForceDeclaration();
public void ForceDeclaration ();
member this.ForceDeclaration : unit -> unit
Public Sub ForceDeclaration ()

설명

메서드는 ForceDeclarationSectionInformation 선언을 구성 파일에 강제로 기록합니다.

참고

메서드는 ForceDeclaration 부모 파일에 이미 선언되어 있으므로 섹션이 필요하지 않더라도 구성 파일에 선언을 강제로 SectionInformation 쓸 수 있습니다. 메서드를 ForceDeclaration 사용하면 구성 파일을 한 컴퓨터에서 다른 컴퓨터로 이식할 수 있습니다. 부모 구성 파일을 제어할 수 없는 경우에도 섹션이 있는지 확인할 수 있습니다.

적용 대상

ForceDeclaration(Boolean)

Source:
SectionInformation.cs
Source:
SectionInformation.cs
Source:
SectionInformation.cs

연결된 구성 섹션을 구성 파일에 표시하거나 구성 파일에서 기존 섹션을 제거합니다.

public:
 void ForceDeclaration(bool force);
public void ForceDeclaration (bool force);
member this.ForceDeclaration : bool -> unit
Public Sub ForceDeclaration (force As Boolean)

매개 변수

force
Boolean

연결된 섹션을 구성 파일에 기록하려면 true이고, 그렇지 않으면 false입니다.

예외

forcetrue이고 연결된 섹션을 자식 구성 파일에 내보낼 수 없거나 섹션이 선언되지 않은 경우

예제

다음 예제에서는 ForceDeclaration 메서드를 사용하는 방법을 보여 줍니다.

// Force the section information to be written to
// the configuration file.
section.SectionInformation.ForceDeclaration(true);
' Force the section information to be written to
' the configuration file.
section.SectionInformation.ForceDeclaration(True)

설명

메서드는 ForceDeclaration 이 인 경우 forcetrue구성 파일에 이 SectionInformation 선언을 강제로 기록합니다. 이 이falseforce 시스템에서 선언이 SectionInformation 필요한 경우 이 작업이 무시될 수 있습니다.

참고

메서드는 ForceDeclaration 이 섹션이 부모 파일에 이미 선언되어 있기 때문에 필요하지 않더라도 구성 파일에 선언을 강제로 SectionInformation 쓸 수 있습니다. 메서드를 ForceDeclaration 사용하면 구성 파일을 한 컴퓨터에서 다른 컴퓨터로 이식할 수 있습니다. 또한 부모 구성 파일을 제어할 수 없는 경우에도 섹션이 있는지 확인할 수 있습니다.

추가 정보

적용 대상