컴파일러 오류 CS0730
업데이트: 2007년 11월
오류 메시지
'type' 형식은 'type'의 중첩 형식이므로 전달할 수 없습니다.
Cannot forward type 'type' because it is a nested type of 'type'
이 오류는 중첩 클래스를 전달하려고 하는 경우에 발생합니다.
예제
다음 샘플에서는 CS0730 오류가 발생하는 경우를 보여 줍니다. 이 샘플은 두 개의 소스 파일로 구성됩니다. 먼저 CS0730a.cs 라이브러리 파일을 컴파일한 다음, 라이브러리 파일을 참조하는 CS0730.cs 파일을 컴파일하십시오.
// CS0730a.cs
// compile with: /t:library
public class Outer
{
public class Nested {}
}
// CS0730.cs
// compile with: /t:library /r:CS0730a.dll
using System.Runtime.CompilerServices;
[assembly:TypeForwardedToAttribute(typeof(Outer.Nested))] // CS0730
[assembly:TypeForwardedToAttribute(typeof(Outer))] // OK