There’s no direct equivalent of “friend” – the closest that’s available (and it isn’t very close) is InternalsVisibleTo. I’ve only ever used this attribute for testing – where it’s very handy!
Example: To be placed in AssemblyInfo.cs
[assembly: InternalsVisibleTo("OtherAssembly")]
Related Posts:
- ImageMagick creating blank transparent square(s) according to width
- Why has the int32 type a maximum value of 2³¹ − 1? [duplicate]
- What is a PDB file?
- What is IP address ‘::1’?
- C# error: “An object reference is required for the non-static field, method, or property”
- Error : Could not load file or assembly or one of it’s dependencies
- Algorithms in O(n^2) vs O(n) [duplicate]
- The remote certificate is invalid according to the validation procedure [duplicate]
- The page was not displayed because the request entity is too large on IIS
- Export Pervasive to MySQL (C#)
- WCF vs ASP.NET Web API
- Why use the params keyword?
- What does plus equals(+=) operator means here?
- The request was aborted: Could not create SSL/TLS secure channel
- Compiler Error Message: The compiler failed with error code -2146232576
- Rename a file in C#
- What does mscorlib stand for?
- Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details
- What is the best way to iterate over a dictionary?
- A generic error occurred in GDI+, JPEG Image to MemoryStream
- “Could not find a part of the path” error message
- WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jquery
- What does the %= operator do? [duplicate]
- What does vary:accept-encoding mean?
- what is this oleaut32.dll?
- Why not use Html.EditorForModel()
- Where can I find System.Web.Helpers, System.Web.WebPages, and System.Web.Razor?
- How to Use TextureBrush for painting an Image
- Can’t use System.Windows.Forms
- How to use the “Using” statement in ASP.net razor webpages?
- Adding values to a C# array
- Where can I find the assembly System.Web.Extensions dll?
- Regex for numbers only
- There is no argument given that corresponds to the required formal parameter – .NET Error
- What does {0} mean when found in a string in C#?
- How do I remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?
- Is there an exponent operator in C#?
- How can I export data to an Excel file
- Could not establish trust relationship for SSL/TLS secure channel — SOAP
- How to convert an Stream into a byte[] in C#?
- Are 2 dimensional Lists possible in c#?
- Passing just a type as a parameter in C#
- Merge two (or more) lists into one, in C# .NET
- How to stop C# console applications from closing automatically? [duplicate]
- Why should I use IHttpActionResult instead of HttpResponseMessage?
- Convert integer to binary in C#
- HTML.ActionLink method
- Thread-safe List
property - Styles.Render in MVC4
- Exception from HRESULT: 0x800A03EC Error
- num1 >= 0x80 – What is 0x80?
- Inconsistent Accessibility: Parameter type is less accessible than method
- How to get correct timestamp in C#
- There is already an open DataReader associated with this Command which must be closed first
- Cannot implicitly convert type ‘int’ to ‘string’ C# class
- How do I exit a foreach loop in C#?
- If a folder does not exist, create it
- C# “No suitable method found to override.” — but there is one
- System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
- What is the purpose of global.asax in asp.net
- How to add a string to a string[] array? There’s no .Add function
- How to block until an event is fired in c#
- How to use WPF Background Worker
- Case insensitive ‘Contains(string)’
- How to catch all exceptions in c# using try and catch?
- Getting “Handshake failed…unexpected packet format” when using WebClient.UploadFile() with “https” when the server has a valid SSL certificate
- Receiving access denied error from Visual Studio when trying to change target framework
- How to force garbage collector to run?
- Page vs Window in WPF?
- CS1617: Invalid option ‘6’ for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default
- When do we use ANTLR
- Sort list by field (C#)
- How to post data to specific URL using WebClient in C#
- How would you count occurrences of a string (actually a char) within a string?
- Value does not fall within the expected range
- The type or namespace name could not be found
- How to execute a stored procedure within C# program
- The remote server returned an error: (405) Method Not Allowed. WCF REST Service
- TTS Voices for Windows7 64 bits
- How can I delete a file that is in use by another process?
- Convert double to float by cast or Convert.ToSingle()?
- Call a stored procedure with parameter in c#
- Type Checking: typeof, GetType, or is?
- How do you wait for input on the same Console.WriteLine() line?
- C# Macro definitions in Preprocessor
- Why doesn’t C# have header files? Will the namespace take care of everything?
- Adding images to buttons from Imagelist on a toolstrip?
- Multiple cases in switch statement
- How to avoid a System.Runtime.InteropServices.COMException?
- System.ArgumentNullException: Value cannot be null. Parameter name: source
- Define: What is a HashSet?
- Convert string to decimal, keeping fractions
- Format of the initialization string does not conform to specification starting at index 0
- Sequence contains more than one element
- Drawing circles with System.Drawing
- Parser Error Message: Could not load type ‘sometype’
- Func vs. Action vs. Predicate [duplicate]
- the source file is different from when the module was built
- How to convert HTML to PDF using iTextSharp
- How to set session timeout in web.config