internal

suggest change

The 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")]

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents