문제

아래 코드의 리턴 유형에 Marshalasattribute를 어떻게 적용합니까?

public ISomething Foo()
{
    return new MyFoo();
}
도움이 되었습니까?

해결책

에 따르면 http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshalasattribute.aspx:

[return: MarshalAs(<your marshal type>)]
public ISomething Foo()
{
    return new MyFoo();
}

다른 팁

[return:MarshalAs]
public ISomething Foo()
{
    return new MyFoo();
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top