Академический Документы
Профессиональный Документы
Культура Документы
November 2016
Object Oriented Programming
Concepts
Topics
• OOP?
• Classes and Objects
• Constructors
• Properties
decimal currentPrice;
decimal
decimalcurrentPrice,
currentPrice; sharesOwned;
public decimal CurrentPrice
public
public decimal
decimal Worth
CurrentPrice
{
{{
get { return currentPrice; }
get { return currentPrice;
currentPrice *} sharesOwned; }
}
} private set { currentPrice = value; }
}
01/01/2021 Windows Programming 22
Properties
• could be automatic
• property accessors internally compile
to methods