Click here to Skip to main content
15,891,828 members
Home / Discussions / C#
   

C#

 
QuestionProperty vs Public Variable Pin
Anurag Gandhi17-Feb-09 3:18
professionalAnurag Gandhi17-Feb-09 3:18 
AnswerRe: Property vs Public Variable Pin
Eddy Vluggen17-Feb-09 3:30
professionalEddy Vluggen17-Feb-09 3:30 
GeneralRe: Property vs Public Variable Pin
PIEBALDconsult17-Feb-09 5:30
mvePIEBALDconsult17-Feb-09 5:30 
GeneralRe: Property vs Public Variable Pin
Eddy Vluggen17-Feb-09 6:29
professionalEddy Vluggen17-Feb-09 6:29 
GeneralRe: Property vs Public Variable Pin
PIEBALDconsult17-Feb-09 6:36
mvePIEBALDconsult17-Feb-09 6:36 
AnswerRe: Property vs Public Variable Pin
EliottA17-Feb-09 3:39
EliottA17-Feb-09 3:39 
AnswerRe: Property vs Public Variable Pin
Pete O'Hanlon17-Feb-09 3:48
mvePete O'Hanlon17-Feb-09 3:48 
AnswerRe: Property vs Public Variable Pin
DaveyM6917-Feb-09 4:08
professionalDaveyM6917-Feb-09 4:08 
Personally I nearly always use properties.

If a value is being made publicly available, it's normally so it can be changed externally, by using properties I get to validate the data before it reaches the field.

In cases where it's not EVER going to be changed, I do use a public field, but marked as static readonly - or const.

Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

GeneralRe: Property vs Public Variable Pin
PIEBALDconsult17-Feb-09 5:31
mvePIEBALDconsult17-Feb-09 5:31 
AnswerProperties SUCK! Pin
Ennis Ray Lynch, Jr.17-Feb-09 4:44
Ennis Ray Lynch, Jr.17-Feb-09 4:44 
AnswerRe: Property vs Public Variable Pin
Xmen Real 17-Feb-09 5:17
professional Xmen Real 17-Feb-09 5:17 
AnswerRe: Property vs Public Variable Pin
cmk17-Feb-09 5:25
cmk17-Feb-09 5:25 
AnswerRe: Property vs Public Variable Pin
PIEBALDconsult17-Feb-09 5:42
mvePIEBALDconsult17-Feb-09 5:42 
AnswerRe: Property vs Public Variable Pin
_Maxxx_17-Feb-09 16:51
professional_Maxxx_17-Feb-09 16:51 
Question.net error in application Pin
ToddHileHoffer17-Feb-09 3:04
ToddHileHoffer17-Feb-09 3:04 
QuestionAccessing Website Content Pin
Rahul Babu17-Feb-09 2:21
Rahul Babu17-Feb-09 2:21 
AnswerRe: Accessing Website Content Pin
SeMartens17-Feb-09 2:23
SeMartens17-Feb-09 2:23 
AnswerRe: Accessing Website Content Pin
dan!sh 17-Feb-09 2:30
professional dan!sh 17-Feb-09 2:30 
AnswerRe: Accessing Website Content Pin
N a v a n e e t h17-Feb-09 2:36
N a v a n e e t h17-Feb-09 2:36 
GeneralRe: Accessing Website Content Pin
Rahul Babu17-Feb-09 2:45
Rahul Babu17-Feb-09 2:45 
GeneralRe: Accessing Website Content Pin
SeMartens17-Feb-09 2:48
SeMartens17-Feb-09 2:48 
GeneralRe: Accessing Website Content Pin
J4amieC17-Feb-09 3:03
J4amieC17-Feb-09 3:03 
AnswerRe: Accessing Website Content Pin
Eddy Vluggen17-Feb-09 3:26
professionalEddy Vluggen17-Feb-09 3:26 
QuestionProcessStartInfo Pin
Peter Walburn17-Feb-09 1:40
Peter Walburn17-Feb-09 1:40 
AnswerRe: ProcessStartInfo Pin
benjymous17-Feb-09 1:46
benjymous17-Feb-09 1:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.