TGViewer
Programming & AI Tips πŸ’‘ Programming & AI Tips πŸ’‘ @programmingtip Β· 46.3K subscribers
Post #249 1.07K
Access Modifiers πŸ€·πŸ»β€β™‚οΈπŸš«

Public 🌎

Using Public, an event or a variable can be accessed from outside of the class, where it belongs.

And also from the outside of the assembly.
γ€°γ€°γ€°γ€°

Private πŸ”’

It restricts the use of methods and variables only within the class itself.

It can't be used from outside of the class.

As you declare a private constructor of a class, that class can't be accessed from outside that class, you can't create an object of that class.
γ€°γ€°γ€°γ€°

Protected β›“

This allows variables and methods to access from that class and the sub class of the class.

That means that methods can be accessed within that class and from the classes, which actually inherit that class.
γ€°γ€°γ€°γ€°

https://t.me/pgimg/4

#Access_Modifiers
@ProgrammingTip
Telegram Programming Tips Resources
More from @programmingtip
  1. Oct 7, 2026OpenAI Decisions API is in public beta πŸš€ OpenAI's Decisions API is now in public beta. It…
  2. Oct 6, 2026Cloudflare shipped a Web Search API ⚑️ Cloudflare introduced a Web Search API. Search can…
  3. Oct 5, 2026AI is changing the developer career ladder πŸš€ GitHub's latest developer career advice is r…
  4. Oct 2, 2026GPT-6 Astra gets an Ultrafast API tier πŸš€ OpenAI added an Ultrafast speed tier for GPT-6 A…
  5. Oct 1, 2026Cloudflare shipped an agentic CLI for its API ⚑️ Cloudflare launched cf, an agentic CLI fo…
  6. Sep 30, 2026OpenAI introduced Dots, always-on agents πŸš€ OpenAI introduced Dots, its take on always-on…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook β†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 β†’