intenal and internal protected
-
Please explain me the use of keyword internal protected and internal with an example ?? what is the difference between internal protected and internal ?? Can construstor be declared internal protected/internal ?? why or why not???
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....
-
Please explain me the use of keyword internal protected and internal with an example ?? what is the difference between internal protected and internal ?? Can construstor be declared internal protected/internal ?? why or why not???
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....
google broken ? internal means visible only within the current assembly. protected internal presumably means visible only to derived classes within the current assembly. Yes, you can make a constructor whatever you like. If it's protected, obviously only derived classes can be created, unless a factory method is provided.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
google broken ? internal means visible only within the current assembly. protected internal presumably means visible only to derived classes within the current assembly. Yes, you can make a constructor whatever you like. If it's protected, obviously only derived classes can be created, unless a factory method is provided.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Sir actually , google too provides this much information.as far as any example is concerned that , upto this limit i can use the internal member vaiables, and till this limit , i can make use of internal protected. I mean if u provide any small example , any example.Please
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....
-
Sir actually , google too provides this much information.as far as any example is concerned that , upto this limit i can use the internal member vaiables, and till this limit , i can make use of internal protected. I mean if u provide any small example , any example.Please
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....
Is what you mean to ask, why would you use these things ? Internal is useful for things you want to hide, but which should be visible within a module. For example, if you have a seperate data layer class that you want to be visible only to the entity classes within your module. internal protected allows you to create a base class which is derived from within your module, but which clients of your module are unable to extend.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
google broken ? internal means visible only within the current assembly. protected internal presumably means visible only to derived classes within the current assembly. Yes, you can make a constructor whatever you like. If it's protected, obviously only derived classes can be created, unless a factory method is provided.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Christian Graus wrote:
protected internal presumably means visible only to derived classes within the current assembly.
I knew I wasn't the only one. :doh:
protected internal
means it's visible everywhere within the same assembly *and* to all subclasses.Cheers, Vıkram.
After all is said and done, much is said and little is done.
-
Please explain me the use of keyword internal protected and internal with an example ?? what is the difference between internal protected and internal ?? Can construstor be declared internal protected/internal ?? why or why not???
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....
'internal' means any class in the same assembly can access it. 'protected' means any class that any inheriting class can access it. 'internal protected' (or 'protected internal' ) means that any class in the same assembly AND any inheriting class can access it. example for internal : If application contains 2 files Assembly1.cs, Assembly2.cs If the first file contains a class (base class) (i.e. in assembly1) The second file is in assembly2…. If u want to access the base class of assembly1 in assembly2 then u can’t access it…this is the concept of Internal… In .Net 2.0 you can have 'friend' assemblies. If you make an assembly a 'friend' of another then it will have access to anything marked internal as if it was in the same assembly
pavan...
-
'internal' means any class in the same assembly can access it. 'protected' means any class that any inheriting class can access it. 'internal protected' (or 'protected internal' ) means that any class in the same assembly AND any inheriting class can access it. example for internal : If application contains 2 files Assembly1.cs, Assembly2.cs If the first file contains a class (base class) (i.e. in assembly1) The second file is in assembly2…. If u want to access the base class of assembly1 in assembly2 then u can’t access it…this is the concept of Internal… In .Net 2.0 you can have 'friend' assemblies. If you make an assembly a 'friend' of another then it will have access to anything marked internal as if it was in the same assembly
pavan...
Assembly1 means Assemblyinfo.cs
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....
-
'internal' means any class in the same assembly can access it. 'protected' means any class that any inheriting class can access it. 'internal protected' (or 'protected internal' ) means that any class in the same assembly AND any inheriting class can access it. example for internal : If application contains 2 files Assembly1.cs, Assembly2.cs If the first file contains a class (base class) (i.e. in assembly1) The second file is in assembly2…. If u want to access the base class of assembly1 in assembly2 then u can’t access it…this is the concept of Internal… In .Net 2.0 you can have 'friend' assemblies. If you make an assembly a 'friend' of another then it will have access to anything marked internal as if it was in the same assembly
pavan...