在下面的代码片段中,GoodBye方法默认标记为内部。我在 AssemblyInfo.cs 文件中添加了以下行,以使此方法在所有其他程序集中可用。
[assembly: InternalsVisibleTo("ConsoleApplication2")]
该类仍然没有将 GoodBy 方法暴露给外部。谁能帮我解决这个问题。提前致谢!
namespace ConsoleApplication2
{
public class Program
{
static void Main(string[] args) { }
public void SayHi() { }
internal void GoodBye() { }
}
}