Click here to Skip to main content
15,926,959 members
Home / Discussions / C#
   

C#

 
GeneralRe: i want to hyperlink connect with stringquery and also display same hyperlink on other page Pin
Richard Andrew x6418-Apr-14 12:54
professionalRichard Andrew x6418-Apr-14 12:54 
QuestionProperty with "get" only, or a separate method? Pin
Matt U.18-Apr-14 8:09
Matt U.18-Apr-14 8:09 
AnswerRe: Property with "get" only, or a separate method? Pin
OriginalGriff18-Apr-14 8:15
mveOriginalGriff18-Apr-14 8:15 
GeneralRe: Property with "get" only, or a separate method? Pin
Matt U.18-Apr-14 8:16
Matt U.18-Apr-14 8:16 
GeneralRe: Property with "get" only, or a separate method? Pin
OriginalGriff18-Apr-14 8:32
mveOriginalGriff18-Apr-14 8:32 
AnswerRe: Property with "get" only, or a separate method? Pin
Ravi Bhavnani18-Apr-14 8:16
professionalRavi Bhavnani18-Apr-14 8:16 
GeneralRe: Property with "get" only, or a separate method? Pin
Matt U.18-Apr-14 8:19
Matt U.18-Apr-14 8:19 
GeneralRe: Property with "get" only, or a separate method? Pin
Ravi Bhavnani18-Apr-14 8:59
professionalRavi Bhavnani18-Apr-14 8:59 
Yes, in terms of program verification and maintenance.  The first method imposes a requirement that SetCityStateZip() be invoked prior to using the composite value.  The latter imposes no such requirement, and further guarantees that the composite will always be correct if its constituent parts are correct.

Going further, I suggest Record have a constructor that consumes a CSV string (or better yet a bag of properties), instead of requiring one or more Set... methods or private property setters to be invoked.  This dependency injection ensures a Record instance can never exist in an invalid state (i.e. constructed but not having all its properties set) before it's used.  This also allows a Record to be easily unit tested by mocking a set of parsed property values.

/ravi
My new year resolution: 2048 x 1536
Home | Articles | My .NET bits | Freeware
ravib(at)ravib(dot)com

Questionmarching cubes Pin
Member 1071125918-Apr-14 7:25
Member 1071125918-Apr-14 7:25 
AnswerRe: marching cubes Pin
OriginalGriff18-Apr-14 8:10
mveOriginalGriff18-Apr-14 8:10 
QuestionBackground Substraction and HOG Pin
Member 1042078418-Apr-14 5:42
Member 1042078418-Apr-14 5:42 
QuestionDisplay graph from selected dropdownlist and radiobutton Pin
Syafiqah Zahirah18-Apr-14 0:43
Syafiqah Zahirah18-Apr-14 0:43 
QuestionCS1525: Invalid expression term '<' error Pin
Member 1075622017-Apr-14 6:12
Member 1075622017-Apr-14 6:12 
AnswerRe: CS1525: Invalid expression term '<' error Pin
Wes Aday17-Apr-14 6:29
professionalWes Aday17-Apr-14 6:29 
GeneralRe: CS1525: Invalid expression term '<' error Pin
OriginalGriff17-Apr-14 8:26
mveOriginalGriff17-Apr-14 8:26 
GeneralRe: CS1525: Invalid expression term '<' error Pin
Richard MacCutchan17-Apr-14 22:16
mveRichard MacCutchan17-Apr-14 22:16 
Questionquestion abot WPF Button Pin
Member 1026763017-Apr-14 3:44
Member 1026763017-Apr-14 3:44 
GeneralRe: question abot WPF Button Pin
Richard MacCutchan17-Apr-14 5:32
mveRichard MacCutchan17-Apr-14 5:32 
GeneralRe: question abot WPF Button Pin
Richard Andrew x6417-Apr-14 8:51
professionalRichard Andrew x6417-Apr-14 8:51 
QuestionHow Do I show Users datail information like Full name,dob etc in a web page stored in database apart from username? Pin
krish099117-Apr-14 1:57
krish099117-Apr-14 1:57 
AnswerRe: How Do I show Users datail information like Full name,dob etc in a web page stored in database apart from username? Pin
Pete O'Hanlon17-Apr-14 2:08
mvePete O'Hanlon17-Apr-14 2:08 
AnswerRe: How Do I show Users datail information like Full name,dob etc in a web page stored in database apart from username? Pin
Tom Marvolo Riddle17-Apr-14 2:21
professionalTom Marvolo Riddle17-Apr-14 2:21 
QuestionSee the Activity monitor of employers Pin
Hrishabh Kushwah17-Apr-14 0:56
professionalHrishabh Kushwah17-Apr-14 0:56 
AnswerRe: See the Activity monitor of employers Pin
Wes Aday17-Apr-14 1:51
professionalWes Aday17-Apr-14 1:51 
AnswerRe: See the Activity monitor of employers Pin
Eddy Vluggen17-Apr-14 10:20
professionalEddy Vluggen17-Apr-14 10:20 

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.