C# Beginner to advanced - Lesson 24 - Properties

مجله خبری، آموزشی پرشین تک
منتشر شده در 11 خرداد 1397

Properties are used to encapsulate and protect fields in C#.

get and set accessors are used to implement properties.

Property with both get and set accessor is a Read/Write property.

Property with only get accessor is a Read only property.

Property with only set accessor is a Write only property. Read/Write Properties.

Read Only Properties.

Write Only Properties.

Auto implemented Properties.

Properties in C#.


Auto Implemented Properties:

If property accessors, does not contain additional logic, then we can make use of auto-implemented properties

Auto-implemented properties were introduced in C#3.0.

Auto-implemented properties reduce the amount of code that we have to write.

When we use auto-implemented properties, the compiler creates a private, anonymous field that can only be accessed through the properties get and set accessors


ankpro

ankpro training

Asp.net MVC

C#

C sharp

Bangalore

Rajajinagar

Selenium

Coded UI

Mobile automation testing

Mobile testing

JQuery

JavaScript

.Net

Components of the .Net framework

Hello World

Literal

Keywords

Variable

Data types

Operators

Branching

Loops

Arrays

ArrayList

Strings

String Builder

Structures

Enums

Functions

Classes

Inheritance

Polymorphism

Properties

Indexers

Events

Nested Classes

Delegates

Anonymous methods

Labda expressions

Abstract classes

Exception Handling

Linq

Interfaces

Extension methods

Anonymous types

Generics

Collections

Garbage Collection

Reflection

Attributes

Input and output statements

Type casting

Boxing and Unboxing

Var vs Dynamic vs Object

دیدگاه کاربران