就像标题所说,我的代码不是在我的项目中的某个特定类中自动完成的,对于像我这样的初学程序员来说这真的很糟糕。代码自动完成不适用于一个特定的类
我都试过按Ctrl + Alt键+空间和去工具 - >文本编辑器 - > C# - >智能感知。这里选中“在输入字符后显示完成列表”。
注:按Ctrl + Alt键+空间确实其他类的工作,如果这是任何帮助。
相关的代码是:
namespace AudioDevices.Devices
{
class CdDiscMan : DisplayAudioDevice
{
private readonly int mBSize = 700;
private bool isEjected = false;
public CdDiscMan(int serialId)
{
base.SerialID = serialId;
}
public void Eject()
{
isEjected = !isEjected;
}
public int MbSize
{
get { return mBSize; }
}
public bool IsEjected
{
get { return isEjected; }
}
}
}
根据要求,一个类中的自动完成功能仍然:
namespace AudioDevices
{
public class Track
{
private category style;
private int id;
private string name, artist, albumSource;
private Time length;
public Track()
{
}
public Track(int id)
{
this.id = id;
}
public Track(int id, string name)
{
this.id = id;
this.name = name;
}
public Track(int id, string artist, string name)
{
this.id = id;
this.artist = artist;
this.name = name;
}
public string GetLength()
{
return length.ToString();
}
public int GetLengthInSeconds()
{
return length.Seconds +
(length.Minutes * 60) +
(length.Hours * 3600);
}
}
}
加入其中intellisence做工精细另一个(小一)班的代码..另外提到两者的文件名..希望你会被回答。另外..它是'ctrl +空间'...不是'ctrl + alt +空格'需要 – Sami
我希望你必须检查这个线程的stackoverflow答案.. https://www.google.com.pk/# q = intellisense + not + working + in + visual + studio – Sami