Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. internal and internal protected

internal and internal protected

Scheduled Pinned Locked Moved C#
iosquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sonia Gupta
    wrote on last edited by
    #1

    namespace validation { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { // ArrayList d = new ArrayList(8); Class1 d; d = new Class1(); } } } thsi is the form class(winodw form class) following ios the user defined class namespace validation { class Class1 { internal protected int h = 0; internal int i=0; } } i know what is the internal and internal protected but y bothe the internal and internal protected are being accessed in form1 class Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....

    A S 2 Replies Last reply
    0
    • S Sonia Gupta

      namespace validation { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { // ArrayList d = new ArrayList(8); Class1 d; d = new Class1(); } } } thsi is the form class(winodw form class) following ios the user defined class namespace validation { class Class1 { internal protected int h = 0; internal int i=0; } } i know what is the internal and internal protected but y bothe the internal and internal protected are being accessed in form1 class Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....

      A Offline
      A Offline
      Abisodun
      wrote on last edited by
      #2

      internal protected is a superset of internal and protected. Was this your understanding?

      1 Reply Last reply
      0
      • S Sonia Gupta

        namespace validation { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { // ArrayList d = new ArrayList(8); Class1 d; d = new Class1(); } } } thsi is the form class(winodw form class) following ios the user defined class namespace validation { class Class1 { internal protected int h = 0; internal int i=0; } } i know what is the internal and internal protected but y bothe the internal and internal protected are being accessed in form1 class Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....

        S Offline
        S Offline
        sreejith ss nair
        wrote on last edited by
        #3

        These are access specifiers, 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. Hope this served your purpose.;P

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups