|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.CompilerServices;
using Assembly3;
// Now, Assembly1 is a friend of Assembly2.
// Hence, the types and Members with internal scope in Assembly2 will be visible in Assembly1.
[assembly: InternalsVisibleTo("Assembly1")]
namespace Assembly2
{
public class ClassB
{
internal static void Method1()
{
Console.WriteLine("Method1() in ClassB is called.");
}
internal static string GetName()
{
return ClassC.Name; // Accessing the INTERNAL property from ClassC.
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.