Click here to Skip to main content
14,449,862 members
   

C#

 
GeneralRe: C# using get set. Why is this failing? Pin
Pete O'Hanlon29-May-19 1:43
communityengineerPete O'Hanlon29-May-19 1:43 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 15:41
MemberBrian_TheLion29-May-19 15:41 
GeneralRe: C# using get set. Why is this failing? Pin
Pete O'Hanlon29-May-19 19:57
communityengineerPete O'Hanlon29-May-19 19:57 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 20:55
MemberBrian_TheLion29-May-19 20:55 
GeneralRe: C# using get set. Why is this failing? Pin
OriginalGriff29-May-19 2:11
communityengineerOriginalGriff29-May-19 2:11 
GeneralRe: C# using get set. Why is this failing? Pin
BillWoodruff29-May-19 4:30
mveBillWoodruff29-May-19 4:30 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 21:14
MemberBrian_TheLion29-May-19 21:14 
GeneralRe: C# using get set. Why is this failing? Pin
BillWoodruff29-May-19 23:48
mveBillWoodruff29-May-19 23:48 
Do keep in mind that MS Guidelines suggest using Properties only as gateways to internal fields [^]
Quote:
In general, methods represent actions and properties represent data. Properties are meant to be used like fields, meaning that properties should not be computationally complex or produce side effects. When it does not violate the following guidelines, consider using a property, rather than a method, because less experienced developers find properties easier to use.
not to produce 'side-effects" by way of internal computation in the setter and/or getter ... and advocates using methods to replace any internal computation.

While I feel "relaxed" about some computation in a Property setter/getter, there are folks who have strong opinions this is bad practice. Another argument against computation in Properties is that end-users of your code may not be aware of the "cost" of access.

Of course, you can implement INotifyPropertyChanged as a "trigger" for some external action.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot


modified 30-May-19 5:10am.

GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion30-May-19 2:20
MemberBrian_TheLion30-May-19 2:20 
GeneralRe: C# using get set. Why is this failing? Pin
BillWoodruff30-May-19 5:33
mveBillWoodruff30-May-19 5:33 
GeneralRe: C# using get set. Why is this failing? Pin
BillWoodruff31-May-19 21:12
mveBillWoodruff31-May-19 21:12 
AnswerRe: C# using get set. Why is this failing? Pin
Gerry Schmitz29-May-19 4:52
mveGerry Schmitz29-May-19 4:52 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 15:52
MemberBrian_TheLion29-May-19 15:52 
QuestionWinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
Ken Guru28-May-19 5:46
MemberKen Guru28-May-19 5:46 
AnswerRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
Eddy Vluggen28-May-19 6:42
professionalEddy Vluggen28-May-19 6:42 
GeneralRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
Ken Guru28-May-19 23:00
MemberKen Guru28-May-19 23:00 
GeneralRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
Eddy Vluggen29-May-19 0:30
professionalEddy Vluggen29-May-19 0:30 
GeneralRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
Ken Guru29-May-19 5:24
MemberKen Guru29-May-19 5:24 
AnswerRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
BillWoodruff28-May-19 16:52
mveBillWoodruff28-May-19 16:52 
GeneralRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
Ken Guru28-May-19 22:54
MemberKen Guru28-May-19 22:54 
GeneralRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
BillWoodruff29-May-19 4:17
mveBillWoodruff29-May-19 4:17 
AnswerRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
Gerry Schmitz29-May-19 4:47
mveGerry Schmitz29-May-19 4:47 
GeneralRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
Ken Guru29-May-19 5:28
MemberKen Guru29-May-19 5:28 
AnswerRe: WinForms, Window with FormBorderStyle.None and Taskbar moved doesn't adjust to new size Pin
BillWoodruff29-May-19 8:12
mveBillWoodruff29-May-19 8:12 
QuestionC# using class library how to get download pdf link in mail Pin
Member 1447263827-May-19 21:28
MemberMember 1447263827-May-19 21:28 

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.