internal
suggest changeThe internal keyword makes a class (including nested classes), property, method or field available to every consumer in the same assembly:
internal class Foo
{
internal string SomeProperty {get; set;}
}
internal class Bar
{
internal string SomeField = new Foo().SomeProperty;
internal class Baz
{
private string blah;
public int N { get; set; }
}
}
A testing assembly can be granted access by adding this to AssemblyInfo.cs:
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("MyTests")]
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents