그래서 나는 이러한 변수 C#을 멤버는
List<string> files, images = new List<string>();
string rootStr;
그리고이 스레드 기능이 참조하는 인스턴스에 액세스 할 수 없습니다
private static int[] thread_search(string root,List<string> files, List<string> images)
하지만 스레드를 시작하려고하면
trd = new Thread(new ThreadStart(this.thread_search(rootStr,files,images)));
을
이 오류가 발생합니다 :
Error 1 Member 'UnusedImageRemover.Form1.thread_search(string, System.Collections.Generic.List, System.Collections.Generic.List)' cannot be accessed with an instance reference; qualify it with a type name instead E:\Other\Projects\UnusedImageRemover\UnusedImageRemover\Form1.cs 149 46 UnusedImageRemover
내가 뭘 잘못하고 있는지 말해 줄 수 있습니까?
'TRD = 새 스레드 (newThreadStart (thread_search (rootStr, 파일, 이미지)));' 이 다음과 같은 오류가 발생합니다 방법 이름 지금 당신 때문에 다른 문제가있는 것 \t @Joe 이노스 –
예상을 너무 빨리 메서드를 호출합니다. 거기에 도움이되는 편집을 추가하겠습니다. –
고마워요 :) –