Ahtasham Hassan
Differentiate bw the public and private ?
By Ahtasham Hassan in C# on Aug 24 2015
  • Ayappan Alagesan
    Feb, 2017 12

    Public can be used everywhere in the application. Private can be access-able only within the scope.

    • 0
  • Manoj Kumar Duraisamy
    Jan, 2017 3

    public can accessible throughout the application private can access only within the class

    • 0
  • Subhashkumar Yadav
    Dec, 2016 19

    .Net has five access SpecifiersPublic -- Accessible outside the class through object reference.Private -- Accessible inside the class only through member functions.Protected -- Just like private but Accessible in derived classes also through member functions.Internal -- Visible inside the assembly. Accessible through objects.Protected Internal -- Visible inside the assembly through objects and in derived classes outside the assembly through member functions.

    • 0
  • Sunil Babu
    Apr, 2016 2

    private is available only in the defined class where as public is available to entire project

    • 0
  • Rafnas T P
    Jan, 2016 27

    public : The type or member can be accessed by any other code in the same assembly or another assembly that references it.private : The type or member can only be accessed by code in the same class or struct.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS