473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Class Access Restriction

Hi All,

I have a solution which has two assemblies (dll files) which call each
other's classes and methods. This is fine as the public methods are
intended for this use.

I would like to protect some of these methods, as they related to core
data access. Since my assemblies will be used in larger applications by
other developers, I want my code (across my two assemblies) to be the
only code which can access them.

Is there a straightforward way to do this? I have investigated creating
web modules and them compiling them all into one assembly (and also
making the methods "internal") but it is a bit messy so am looking for
a better solution.

It is not feasible to merge all the assemblies into one assembly.

If you have any input on this topic that would be great.

Thanks,

Nov 13 '06 #1
1 1116
Hi All,

I think I have found a solution. For those of you using .NET 2.0 you'll
be able to make use of a new feature called Friendly Assemblies. It
allows you to give external assemblies access to "internal" methods.

http://msdn2.microsoft.com/en-us/library/0tke9fxk.aspx

Hope that helps,

ni********@gmail.com wrote:
Hi All,

I have a solution which has two assemblies (dll files) which call each
other's classes and methods. This is fine as the public methods are
intended for this use.

I would like to protect some of these methods, as they related to core
data access. Since my assemblies will be used in larger applications by
other developers, I want my code (across my two assemblies) to be the
only code which can access them.

Is there a straightforward way to do this? I have investigated creating
web modules and them compiling them all into one assembly (and also
making the methods "internal") but it is a bit messy so am looking for
a better solution.

It is not feasible to merge all the assemblies into one assembly.

If you have any input on this topic that would be great.

Thanks,
Nov 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Sean Don | last post by:
Hello! Is it possible to make classes friends in Python? Or is it better to just stick to "Java style" .isThis, .getThat, .setThis style functions? I understand that classes are generally...
0
by: keith bannister via .NET 247 | last post by:
(Type your message here) -------------------------------- From: keith bannister Hi, I'm new to .net (as of last week) but here goes. I want to serialize/deserialize a file the conforms...
5
by: Keith Bannister | last post by:
I'm new to .net so here goes. I'm tying to deserialize a class that is associated with an XML schema. I created the C# class with xsd.exe as below: xsd.exe /c /n:somenamespace...
9
by: Lonewolf | last post by:
Hi everyone.. I was trying to implement callback fucntions in native codes in my VC8 class, and referred to some online codes which use native class nested within managed class. basically of the...
8
by: Les Caudle | last post by:
Using this command line to run XSD.exe xsd /c /o:outputDir input.xsd /f on the following XSD <?xml version="1.0"?> <schema xmlns="http://www.w3.org/2001/XMLSchema"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.