Click here to Skip to main content
15,909,737 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: internal interfaces Pin
emission17-Jan-05 10:02
emission17-Jan-05 10:02 
Thank you for enlightening me on the boxing issue. Now I know what that means.

Is there no overhead when converting, i.e using ((IBaseObject)Dog).baseobject instead of directly accessing a public Dog.baseobject?


Heath Stewart wrote:
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

Yes, I've studied this issue, after reading an article in MSDN Magazine, and this may very well be of interest in some projects. However, this time it's more a design issue than a security issue, and I just curiously wonder about the reasons behind.

I think that it would be logical that with interface

<br />
internal interface IAnimal<br />
{<br />
   int Age{get;}<br />
}<br />


...a class like this

<br />
public class Dog : IAnimal<br />
{<br />
   internal int IAnimal.Age<br />
   {<br />
      get {return 1};<br />
   }<br />
}<br />


..would be quite enough to satisfy the interface contract. In fact I think it satifies the contract more clearly than

<br />
public class Dog : IAnimal<br />
{<br />
   int IAnimal.Age<br />
   {<br />
      get {return 1};<br />
   }<br />
}<br />


...does.

Since I'm obviously wrong I would like to be corrected, so that I can understand the reasoning behind this.
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 
GeneralRe: Client/Server Pin
Gregg Holter17-Jan-05 0:12
Gregg Holter17-Jan-05 0:12 

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.