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. Web Development
  3. ASP.NET
  4. Private Class

Private Class

Scheduled Pinned Locked Moved ASP.NET
csharp
5 Posts 4 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.
  • R Offline
    R Offline
    rockz
    wrote on last edited by
    #1

    what are private classes in .net

    J C C 3 Replies Last reply
    0
    • R rockz

      what are private classes in .net

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      A class declared with the privat keyword. private class MyClass { }

      1 Reply Last reply
      0
      • R rockz

        what are private classes in .net

        C Offline
        C Offline
        coolestCoder
        wrote on last edited by
        #3

        Even I dont know. :laugh:


        "A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder


        coolestCoder

        1 Reply Last reply
        0
        • R rockz

          what are private classes in .net

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          Sheena wrote:

          what are private classes in .net

          They would initially seem to be a bit pointless, but they have their uses. They are classes that can be nested within another class. They are private to the class they are nested within and cannot be used externally because they are private. e.g.

          public class OuterClass
          {
          private class InnerClass
          {
          }
          }

          In the above example, nothing outside of the OuterClass can see the InnerClass.


          Upcoming FREE developer events: * Developer Day Scotland My website

          C 1 Reply Last reply
          0
          • C Colin Angus Mackay

            Sheena wrote:

            what are private classes in .net

            They would initially seem to be a bit pointless, but they have their uses. They are classes that can be nested within another class. They are private to the class they are nested within and cannot be used externally because they are private. e.g.

            public class OuterClass
            {
            private class InnerClass
            {
            }
            }

            In the above example, nothing outside of the OuterClass can see the InnerClass.


            Upcoming FREE developer events: * Developer Day Scotland My website

            C Offline
            C Offline
            coolestCoder
            wrote on last edited by
            #5

            Thanks !


            "A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder


            coolestCoder

            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