Interviews - C# Corner

masthan p
what is the default access specifier within the namespaces in c#?
By masthan p in C# on Dec 02, 2012
  • Jaya Kukudkar
    Feb, 2013 26

    Internal if it is directly declared inside namespace. Private if it is nested. Here's some explanation: Classes and structs that are declared directly within a namespace (in other words, that are not nested within other classes or structs) can be either public or internal. Internal is the default if no access modifier is specified. Struct members, including nested classes and structs, can be declared as public, internal, or private. Class members, including nested classes and structs, can be public, protected internal, protected, internal, or private. The access level for class members and struct members, including nested classes and structs, is private by default. Private nested types are not accessible from outside the containing type.

    • 1
  • Jaya Kukudkar
    Feb, 2013 26

    • 1
  • Rishi Malvi
    Mar, 2014 27

    no namespace is required for access specifier

    • 0
  • Sandeep Mhatre
    Apr, 2013 23

    internal for other types refer following link http://sandeepmhatre.blogspot.com/2013/04/access-specifier-in-c.html

    • 0
  • Sandeep Mhatre
    Apr, 2013 23

    internal for other types refer following link http://sandeepmhatre.blogspot.com/2013/04/access-specifier-in-c.html

    • 0
  • Sandeep Mhatre
    Apr, 2013 23

    internal for other types refer following link http://sandeepmhatre.blogspot.com/2013/04/access-specifier-in-c.html

    • 0
  • Sandeep Mhatre
    Apr, 2013 23

    internal for other types refer following link http://sandeepmhatre.blogspot.com/2013/04/access-specifier-in-c.html

    • 0
  • Sandeep Mhatre
    Apr, 2013 23

    internal for other types refer following link http://sandeepmhatre.blogspot.com/2013/04/access-specifier-in-c.html

    • 0
  • Raghavendra U
    Mar, 2013 20

    Namespace will not have access modifier.

    • 0
  • keerthi rakasi
    Feb, 2013 28

    private

    • 0
  • keerthi rakasi
    Feb, 2013 28

    private

    • 0
  • Jaya Kukudkar
    Feb, 2013 26

    Internal if it is directly declared inside namespace. Private if it is nested. Here's some explanation: Classes and structs that are declared directly within a namespace (in other words, that are not nested within other classes or structs) can be either public or internal. Internal is the default if no access modifier is specified. Struct members, including nested classes and structs, can be declared as public, internal, or private. Class members, including nested classes and structs, can be public, protected internal, protected, internal, or private. The access level for class members and struct members, including nested classes and structs, is private by default. Private nested types are not accessible from outside the containing type.

    • 0
  • Lalit Rana
    Feb, 2013 11

    internal

    • 0
  • Koteeswaran Lakshmikanth
    Jan, 2013 30

    Private

    • 0
  • Giri Birnurkar
    Jan, 2013 24

    Private

    • 0
  • Atulya Panda
    Jan, 2013 11

    In c#.net by default access specifier is internal.......

    • 0
  • Anil Kumar
    Jan, 2013 5

    public

    • 0
  • raz real
    Dec, 2012 27

    internal

    • 0
  • Santosh PavanKumar
    Dec, 2012 19

    Private

    • 0
  • Sunil Kumar
    Dec, 2012 18

    Internal

    • 0
  • Rajesh Gonugunta
    Dec, 2012 17

    Public

    • 0
  • masthan p
    Dec, 2012 2

    internal

    • 0

Cloud & IoT DevCon16

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS