Click here to Skip to main content
15,913,486 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# class hierarchy Pin
Heath Stewart17-Jan-05 6:18
protectorHeath Stewart17-Jan-05 6:18 
GeneralRe: C# class hierarchy Pin
17-Jan-05 11:55
suss17-Jan-05 11:55 
Generalnetwork path in conjunction with file.exists Pin
RB@Emphasys17-Jan-05 5:38
RB@Emphasys17-Jan-05 5:38 
GeneralRe: network path in conjunction with file.exists Pin
Heath Stewart17-Jan-05 6:28
protectorHeath Stewart17-Jan-05 6:28 
Generalinternal interfaces Pin
emission17-Jan-05 2:27
emission17-Jan-05 2:27 
GeneralRe: internal interfaces Pin
leppie17-Jan-05 4:36
leppie17-Jan-05 4:36 
GeneralRe: internal interfaces Pin
emission17-Jan-05 6:15
emission17-Jan-05 6:15 
GeneralRe: internal interfaces Pin
Heath Stewart17-Jan-05 6:41
protectorHeath Stewart17-Jan-05 6:41 
emission wrote:
And, although I'm not sure, it seems that could lead to undesirable boxing/unboxing. Maybe it doesn't. I also find it strange that baseobject now becomes effectively internal, but I can't expose it as being internal.

Boxing and unboxing[^] describes the process where value types (eg, structs, primitives, and enumerations) are wrapped in objects or vice versa, basically. Read the link for more details.

Unless Victim is a value type (highly unlikely, especially in COM) there is no risk of boxing or unboxing - only conversion.

If you want to truly limit assembly access to a member or class, then learn to utilize the security infrastructure of .NET: Code Access Security[^].

If you want to limit access to a single assembly, you would attribute your member like so (declaritive security):
[StrongNameIdentityPermission(SecurityAction.Demand, Name="MyAssembly", PublicKey="0123456789abcdef")]
object baseobject
{
  get { return _baseobject; }
}
Where Name is your assembly name and PublicKey is your hex-encoded, 16-character public key (which you can get for your assembly in many ways). If you do not strong name your assembly than you have no security. The public key token is derived from your private key used to sign the assembly. If you don't sign the assembly and don't keep your private key private then anyone can spoof your permission demand.

If you want to allow all your assemblies access to the member, then just specify the PublicKey field and use the same key to sign all your assemblies (this is typical for a single organization anyway).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: internal interfaces Pin
emission17-Jan-05 10:02
emission17-Jan-05 10:02 
GeneralRe: internal interfaces Pin
Heath Stewart17-Jan-05 10:52
protectorHeath Stewart17-Jan-05 10:52 
GeneralRe: internal interfaces Pin
emission17-Jan-05 12:30
emission17-Jan-05 12:30 
Generaldebugging diabled Pin
Member 166075017-Jan-05 2:25
Member 166075017-Jan-05 2:25 
GeneralRe: debugging diabled Pin
Heath Stewart17-Jan-05 7:11
protectorHeath Stewart17-Jan-05 7:11 
GeneralCreating ms installer with V. C# Pin
basbous17-Jan-05 2:13
basbous17-Jan-05 2:13 
GeneralRe: Creating ms installer with V. C# Pin
Heath Stewart17-Jan-05 6:46
protectorHeath Stewart17-Jan-05 6:46 
GeneralC# Pin
Anonymous17-Jan-05 2:10
Anonymous17-Jan-05 2:10 
GeneralRe: C# Pin
johnhebert17-Jan-05 4:42
johnhebert17-Jan-05 4:42 
GeneralListing a files in a client directory Pin
Sree7417-Jan-05 1:46
sussSree7417-Jan-05 1:46 
GeneralRe: Listing a files in a client directory Pin
Heath Stewart17-Jan-05 6:52
protectorHeath Stewart17-Jan-05 6:52 
GeneralRe: Listing a files in a client directory Pin
Member 37818918-Jan-05 4:04
Member 37818918-Jan-05 4:04 
GeneralReading local file on the client side Pin
Sreeanth17-Jan-05 1:37
sussSreeanth17-Jan-05 1:37 
GeneralRe: Reading local file on the client side Pin
leppie17-Jan-05 4:40
leppie17-Jan-05 4:40 
GeneralRe: Reading local file on the client side Pin
Heath Stewart17-Jan-05 7:02
protectorHeath Stewart17-Jan-05 7:02 
GeneralClient/Server Pin
Gregg Holter16-Jan-05 23:50
Gregg Holter16-Jan-05 23:50 
GeneralRe: Client/Server Pin
Robert Rohde17-Jan-05 0:10
Robert Rohde17-Jan-05 0:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.