Click here to Skip to main content
15,907,329 members
Home / Discussions / C#
   

C#

 
GeneralRe: Backup of the application data Pin
NarendraSinghJTV18-Dec-09 1:45
NarendraSinghJTV18-Dec-09 1:45 
QuestionTrying To Create A Data Access Layer Pin
Roger Wright15-Dec-09 19:17
professionalRoger Wright15-Dec-09 19:17 
AnswerRe: Trying To Create A Data Access Layer Pin
Saksida Bojan15-Dec-09 20:37
Saksida Bojan15-Dec-09 20:37 
GeneralRe: Trying To Create A Data Access Layer Pin
0x3c015-Dec-09 21:06
0x3c015-Dec-09 21:06 
GeneralRe: Trying To Create A Data Access Layer Pin
Roger Wright16-Dec-09 6:51
professionalRoger Wright16-Dec-09 6:51 
AnswerRe: Trying To Create A Data Access Layer Pin
0x3c015-Dec-09 21:06
0x3c015-Dec-09 21:06 
GeneralRe: Trying To Create A Data Access Layer Pin
Saksida Bojan15-Dec-09 22:44
Saksida Bojan15-Dec-09 22:44 
AnswerRe: Trying To Create A Data Access Layer Pin
Rob Philpott15-Dec-09 22:03
Rob Philpott15-Dec-09 22:03 
Hmm. Perhaps an unusual approach you describe.

Why, for starters do you need an integer defining the type? The actual object itself has type which we can query.

The different type 'dev' variables you create are only going to have local scope (ie last as long as the case part). And, from memory, I don't think its going to allow you redeclare a variable multiple times in a single switch. Normally, dev would be some sort of member variable.

This:

Recloser dev = new Recloser();
dev = (Recloser)Device;


makes no sense. You'd use:

Recloser dev = (Recloser)Device;


Perhaps what you want is multiple constructors, each taking a different subclass of device?


public DeviceData(Recloser device)
{
    dev = device;
}


etc.

Another question - why have a single data access class which handles all these different 'devices' - why not have one per class? That would make life quite a bit simpler as you won't have to be continually determining what device you've got before taking actions.

All very vague I'm afraid.

Regards,
Rob Philpott.

GeneralRe: Trying To Create A Data Access Layer Pin
Roger Wright16-Dec-09 2:13
professionalRoger Wright16-Dec-09 2:13 
AnswerRe: Trying To Create A Data Access Layer Pin
Keith Barrow16-Dec-09 3:07
professionalKeith Barrow16-Dec-09 3:07 
GeneralRe: Trying To Create A Data Access Layer Pin
Roger Wright16-Dec-09 6:47
professionalRoger Wright16-Dec-09 6:47 
AnswerRe: Trying To Create A Data Access Layer Pin
PIEBALDconsult16-Dec-09 4:03
mvePIEBALDconsult16-Dec-09 4:03 
GeneralRe: Trying To Create A Data Access Layer Pin
Keith Barrow16-Dec-09 4:44
professionalKeith Barrow16-Dec-09 4:44 
GeneralRe: Trying To Create A Data Access Layer Pin
PIEBALDconsult16-Dec-09 6:56
mvePIEBALDconsult16-Dec-09 6:56 
GeneralRe: Trying To Create A Data Access Layer Pin
Roger Wright16-Dec-09 6:51
professionalRoger Wright16-Dec-09 6:51 
GeneralRe: Trying To Create A Data Access Layer Pin
PIEBALDconsult16-Dec-09 7:01
mvePIEBALDconsult16-Dec-09 7:01 
Questionshow the number and name of file being copied Pin
billcodes15-Dec-09 19:11
billcodes15-Dec-09 19:11 
AnswerRe: show the number and name of file being copied Pin
Abhijit Jana15-Dec-09 19:43
professionalAbhijit Jana15-Dec-09 19:43 
QuestionFluid Layout By Custom Polygon Shapes Pin
Som Shekhar15-Dec-09 18:33
Som Shekhar15-Dec-09 18:33 
AnswerRe: Fluid Layout By Custom Polygon Shapes Pin
Saksida Bojan15-Dec-09 20:26
Saksida Bojan15-Dec-09 20:26 
GeneralRe: Fluid Layout By Custom Polygon Shapes Pin
Som Shekhar15-Dec-09 20:28
Som Shekhar15-Dec-09 20:28 
QuestionHow to count Array Numbers? Pin
DevonDaDude15-Dec-09 18:25
DevonDaDude15-Dec-09 18:25 
AnswerRe: How to count Array Numbers? Pin
Abhinav S15-Dec-09 19:24
Abhinav S15-Dec-09 19:24 
GeneralRe: How to count Array Numbers? Pin
jb060816-Dec-09 0:05
jb060816-Dec-09 0:05 
GeneralRe: How to count Array Numbers? Pin
OriginalGriff16-Dec-09 1:20
mveOriginalGriff16-Dec-09 1: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.