
ReflectionAttribute::isRepeated은 속성 반복 여부를 나타내는 속성입니다. 이 속성이 true일 때, 속성을 여러 번 선언할 수 있습니다.
예를 들어, 다음 코드를 살펴보겠습니다.
#hostingforum.kr
csharp
[ReflectionAttribute(IsRepeated = true)]
public class MyClass
{
[ReflectionAttribute]
public int Property1 { get; set; }
[ReflectionAttribute]
public int Property2 { get; set; }
}
이 경우, `Property1`과 `Property2`는 모두 `ReflectionAttribute`를 상속받고, `IsRepeated` 속성이 true이므로 속성을 여러 번 선언할 수 있습니다.
하지만, 다음 코드를 살펴보겠습니다.
#hostingforum.kr
csharp
[ReflectionAttribute(IsRepeated = false)]
public class MyClass
{
[ReflectionAttribute]
public int Property1 { get; set; }
[ReflectionAttribute]
public int Property2 { get; set; }
}
이 경우, `Property1`과 `Property2`는 모두 `ReflectionAttribute`를 상속받지만, `IsRepeated` 속성이 false이므로 속성을 여러 번 선언할 수 없습니다.
결과적으로, `ReflectionAttribute::isRepeated` 속성은 속성을 여러 번 선언할 수 있는지 여부를 결정하는 데 사용됩니다.
2025-05-10 23:57