1
Visual Studio를 새로 설치하면 다음 코드에서 제목에 오류가 발생합니다.형식 또는 네임 스페이스 이름 'LinkedList'를 찾을 수 없습니다 (사용 지시문 또는 어셈블리 참조가 누락 되었습니까?)
using System;
using System.Collections;
using System.Collections.Generic;
public class GenericCollection
{
public static void Main()
{
// Create and initialize a new LinkedList.
LinkedList<String> ll = new LinkedList<String>();
ll.AddLast("red");
ll.AddLast("orange");
ll.AddLast("yellow");
ll.AddLast("orange");
// Display the contents of the LinkedList.
if (ll.Count > 0)
{
Console.WriteLine("The item in the list is {0}.", ll.First.Value);
Console.WriteLine("The item in the list is {0}.", ll.Last.Value);
Console.WriteLine("The LinkedList contains:");
foreach (String s in ll)
Console.WriteLine(" {0}", s);
}
else
{
Console.WriteLine("The LinkedList is empty.");
}
}
}
난 사용자 정의 클래스를 사용하고 있지 않다. 을 그냥 참조에 문제가있는 가정합니다 System.Collections.Generic DLL을 에서, 코드가 올바른 때문이다.
를 도와주세요, 어떻게 이 문제를 해결합니다. (추신 : 나는 코딩의 새로운 주제입니다)
어떤 .NET Framework 버전을 사용하고 있습니까? – Khan
4.0.30319. 내 약에서 말한다 -> visual studio C# 2010 – novice
프로젝트를 확인하십시오. 솔루션 탐색기에서 프로젝트를 마우스 오른쪽 단추로 클릭하고 속성으로 이동하십시오. 응용 프로그램 탭에서 대상 프레임 워크는 무엇을 말합니까? – Khan