This is a discussion on what is the difference between internal protected and protected? within the C# Programming forums, part of the Software Development category; Hi, Please explain me the use of keyword internal protected with an example ?? what is the difference between internal protected ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, Please explain me the use of keyword internal protected with an example ?? what is the difference between internal protected and protected ?? Can constructor be declared protected ?? why or why not???
__________________ The OXYGEN Delivers edgy, intelligent Technology to all... |
| Sponsored Links |
| |||
| Hi, If we use "protected" before a method/variable, it can be accessed only to derived class. If we use "internal" before a method/variable, it can be access only within the same assembly. So, internal protected can be accessed within the same assembly as well as in derived class. protected constructors - Yes, you can use I think. Below is some Info. Peter Hallam's WebLog : Many Questions: Protected Constructors
__________________ S.Balasubramanian Nothing is impossible |
| |||
| difference between internal protected and protected Protected: A protected member is accessible from within the class in which it is declared, and from within any class derived from the class that declared this member. Internal Protected: Internal types or members are accessible only within files in the same assembly. ThankQ KiruthikaSambandam |
| |||
| The constructor is meant to be used by a derived class only. If all the constructors are protected then I guess its a way of saying don't declare a variable with this class, derive your own class from this class and use that. But I'd also say there a better ways of doing that, just making the class abstract will also have the same effect.
__________________ Shaalini.S ![]() Be the Best of Whatever you are... Last edited by shaalini : 11-22-2007 at 04:54 AM. |
| |||
| protected. Access is limited to the containing class or types derived from the containing class. internal Access is limited to the current assembly. protected internal Access is limited to the current assembly or types derived from the containing class. Thanks Sathian.K |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Attempted to read write protected memory | Balasubramanian.S | C# Programming | 0 | 03-21-2008 09:47 PM |
| Crack a password protected word document using C#? | $enthil | C# Programming | 3 | 11-19-2007 11:33 PM |
| How to convert the Normal PDF to protected PDF in Asp.net?(i.e user should save the p | bluesky | ASP and ASP.NET Programming | 0 | 07-16-2007 12:27 AM |