C#

What is Friends Assembly in C#

An assembly that can access the Friend type(Visual Basic) or internal type (C#) member information are referred to as a “friend assembly“.

You don’t have to mark types and members as public in order for them to be accessed by other assemblies if you identify an assembly as a friend assembly.

Friend assembly is very relevant in the following programming situations,

Adding new features to a class library which must have access to existing internal and external members in C# and Friend in Visual Basic.

In unit testing cases when unit test code runs in a separate assembly module and needs access to members in the assembly to be tested when they are marked as Friend in Visual Basic  or internal in C#.

 

Rajeev

View Comments

Recent Posts

OWIN Authentication in .NET Core

OWIN (Open Web Interface for .NET) is an interface between web servers and web applications…

1 year ago

Serializing and Deserializing JSON using Jsonconvertor in C#

JSON (JavaScript Object Notation) is a commonly used data exchange format that facilitates data exchange…

1 year ago

What is CAP Theorem? | What is Brewer’s Theorem?

The CAP theorem is also known as Brewer's theorem. What is CAP Theorem? CAP theorem…

1 year ago

SOLID -Basic Software Design Principles

Some of the Key factors that need to consider while architecting or designing a software…

1 year ago

What is Interface Segregation Principle (ISP) in SOLID Design Principles?

The Interface Segregation Principle (ISP) is one of the SOLID principles of object-oriented design. The…

1 year ago

What is Single Responsibility Principle (SRP) in SOLID Design Priciples?

The Single Responsibility Principle (SRP), also known as the Singularity Principle, is a software design…

1 year ago