🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #10202

Re: properties?

#10202
From: Tomasz Muszyński
Date: Mon, 21 Nov 2005 00:14
25 lines
1489 bytes
^KoWaL^ napisał(a):
> Witam. Ucze sie dopiero c#, wiec prosze o wyrozumielosc:)
> Czy ktos mi moze powiedziec do czego sluza properties np takie jak ta:
> 
> public int Hour
> {
>   get
>   {
>     return hour;
>   }
>   set
>   {
>     hour = value;
>   }
> }


Akurat to, to prawie do tego samego co:
public int Hour;

Ale jeśli chciałbyś jeszcze dorobić jakieś akcje następujące po zmianie 
wartości hour, np. zapamiętać godzinę w postaci sekund, wysłać event, 
odświeżyć GUI, itp. to nadają się do tego idealnie.

tm
Technical Details
Message-ID: <dlr3i8$gve$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <dlr25p$i3n$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Tomasz Muszyński <thom_ek@op.pl_nospam>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: properties?
Date: Mon, 21 Nov 2005 01:14:53 +0100
Organization: tp.internet - http://www.tpi.pl/
Lines: 27
Message-ID: <dlr3i8$gve$1@atlantis.news.tpi.pl>
References: <dlr25p$i3n$1@inews.gazeta.pl>
NNTP-Posting-Host: dnk37.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1132532105 17390 83.24.92.37 (21 Nov 2005 00:15:05 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Mon, 21 Nov 2005 00:15:05 +0000 (UTC)
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: pl, en-us, en
In-Reply-To: <dlr25p$i3n$1@inews.gazeta.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit