Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
GeneralRe: Delay windows power events Pin
Dave Kreskowiak20-Jun-15 7:38
mveDave Kreskowiak20-Jun-15 7:38 
GeneralRe: Delay windows power events Pin
Member 1085025320-Jun-15 7:59
Member 1085025320-Jun-15 7:59 
GeneralRe: Delay windows power events Pin
Member 1085025320-Jun-15 1:34
Member 1085025320-Jun-15 1:34 
QuestionInheritance Pin
JammoD8719-Jun-15 11:35
JammoD8719-Jun-15 11:35 
AnswerRe: Inheritance Pin
harold aptroot19-Jun-15 11:44
harold aptroot19-Jun-15 11:44 
GeneralRe: Inheritance Pin
JammoD8719-Jun-15 11:46
JammoD8719-Jun-15 11:46 
GeneralRe: Inheritance Pin
harold aptroot19-Jun-15 11:51
harold aptroot19-Jun-15 11:51 
SuggestionRe: Inheritance Pin
Sascha Lefèvre19-Jun-15 12:53
professionalSascha Lefèvre19-Jun-15 12:53 
Suggestions:

If this isn't a quickly abstracted example but your actual code then don't include the type name in the name of fields or properties and also not the class name. "PDVString" doesn't convey any useful meaning. If it is a description, name it "Description" or likewise for whatever it is.

And to me it looks like you could just as well make it a base class member. For handhelds it will contain the description (or whatever) for handhelds and else for non-handhelds. Likewise you could replace the TextBoxes "txtPDV" and "txtPDVHH" by a single TextBox "txtDescription" and thus do away with any type distinction:
C#
var pdv1 = isHandheld /* == true */ ? (basePDV)new PDVHH() : (basePDV)new PDV();
                      // ^^^ superfluous because isHandheld already is a boolean

txtCaseID.Text = pdv1.CaseID;
txtDescription.Text = pdv1.Description;

If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

AnswerRe: Inheritance Pin
JammoD8719-Jun-15 21:26
JammoD8719-Jun-15 21:26 
QuestionC# need 2 threads for long execution Pin
dracebus19-Jun-15 8:48
dracebus19-Jun-15 8:48 
AnswerRe: C# need 2 threads for long execution Pin
PIEBALDconsult19-Jun-15 8:59
mvePIEBALDconsult19-Jun-15 8:59 
GeneralRe: C# need 2 threads for long execution Pin
dracebus19-Jun-15 9:02
dracebus19-Jun-15 9:02 
GeneralRe: C# need 2 threads for long execution Pin
PIEBALDconsult19-Jun-15 9:12
mvePIEBALDconsult19-Jun-15 9:12 
GeneralRe: C# need 2 threads for long execution Pin
Dave Kreskowiak19-Jun-15 9:21
mveDave Kreskowiak19-Jun-15 9:21 
GeneralRe: C# need 2 threads for long execution Pin
Philippe Mori19-Jun-15 16:20
Philippe Mori19-Jun-15 16:20 
QuestionTrying to sum several fields into a total field Pin
Norris Chappell18-Jun-15 16:17
Norris Chappell18-Jun-15 16:17 
AnswerRe: Trying to sum several fields into a total field Pin
OriginalGriff18-Jun-15 19:15
mveOriginalGriff18-Jun-15 19:15 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell18-Jun-15 20:26
Norris Chappell18-Jun-15 20:26 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell18-Jun-15 20:31
Norris Chappell18-Jun-15 20:31 
GeneralRe: Trying to sum several fields into a total field Pin
Pete O'Hanlon18-Jun-15 22:39
mvePete O'Hanlon18-Jun-15 22:39 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell19-Jun-15 4:44
Norris Chappell19-Jun-15 4:44 
GeneralRe: Trying to sum several fields into a total field Pin
Richard MacCutchan19-Jun-15 7:02
mveRichard MacCutchan19-Jun-15 7:02 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell19-Jun-15 7:23
Norris Chappell19-Jun-15 7:23 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell19-Jun-15 5:35
Norris Chappell19-Jun-15 5:35 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell19-Jun-15 9:30
Norris Chappell19-Jun-15 9:30 

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.