C# Access Modifiers: What They Are and Why We Need Them

preview_player
Показать описание
C# Access Modifiers Tutorial

SUBSCRIBE FOR MORE VIDEOS!

STAY IN TOUCH
Рекомендации по теме
Комментарии
Автор

Aula muito bem explicada e com uma didática excelente, obrigada professor!!!!

barbararoberta
Автор

Wow suddenly one of my favorite channels

toystoryscarymovie-forkids
Автор

thank you really good
my english is bad but your explain cery good and i understand

eligeghiasi
Автор

0:30 - What is an access modifier?
0:39 - Why need access modifiers?
1:03 - Example
1:24 - Object-oriented programming
1:58 - Encapsulation
6:28 - Demo

XXIcenturyblood
Автор

Thanks alot. Actually i find giving many related concepts in same video to be a great way for both beginners who need the basics or as revision for more experienced programmers to connect all subject together. Great work. Only one comment. I wish u make videos about GUI windows and web forms and wpf

wadoodaref
Автор

PrivateProtected was an but I highly appreciate your lecture.

DrWambua
Автор

I was an intermediate python programmer. My interest is software development. But I just understood python isn't good for software development. So I am switching to C#

araftelevision
Автор

You helped me alot. Sadly i cant afford the rest of the course.

MrXCQT
Автор

Hey there, there is a few reasons that explain why it's better to access a value via method instead of directly.
First: you get bug protection from your own mistakes, like for example if you accidentally called it somewhere and changed it's value.

Second: it protects against bad actors in a collaboration.
Imagine being able to mess with a social security numbers because you were part of a team working on a huge project, now the team is busy debugging why their output is wrong, being restricted to methods can stop you from messing with the teams data.

Third: Large scale collaboration, you may be using 3rd party data and you should only gain an encrypted access to these variables, which you can return by methods.

nabkawe
Автор

hello! i cant seem to follow the link you provided, it's flagged as risky website by nord and kaspersky

dimazashari
Автор

Hi, is in C# something like "friend" operator from C++? In example I would like to create my own Linked List data structure. It would be made of class LinkedList, which would have an access to the contents of a Node class. However, I want the Node class to be inaccessible to everything else in the app. Is there a simple way to achieve it?

Rizzan
Автор

I finally understand set and get. it took 3 years..hahaha

mahdikhalil
Автор

Private : using method for access the field...
Auto-property : Excuse me!!!!
😂😁😀😀😄💋🙏😆😘😜😄😍😄😭😝😔😜😔

ksalphalcsihp
Автор

C# has long had the this-dot notation which makes underscore for private fields invalid for almost all scenarios. Why type "this._name" when "this.name" is just as good?


The only reason I ever have for using the underscore at the beginning of a private field's name, is to keep my code hints clean when using it as a backing field for a property. That way I don't accidentally use the private field (inside class methods) if I have some logic in my property I want to always execute. Whenever I see an underscored field in my code, I know that it's a backing field and should NEVER be used except inside the property's getter or setter.

conanhorus
Автор

You haven't explained anything about the rest of the access modifiers other than the public and private ??

nithyas
Автор

Why are you explaining the naming convention? Isn't it a video about access modifiers?! That's a completely different topic.

dinisf
Автор

You are outdated
The way you teach is so confusing and boring.

abdulkarimdorman
Автор

if you really want to teach then don't do advertising just teach, Education have no price. I don't know whether you are a Muslim or jew your name refer to one of them but Muslims don't do like you are doing giving hope and then pay. LoL man LoL.

rxnnone