Click here to Skip to main content
15,881,172 members
Home / Discussions / C#
   

C#

 
GeneralRe: Alternative to using a string as a key? Pin
SledgeHammer013-Jan-12 12:15
SledgeHammer013-Jan-12 12:15 
AnswerRe: Alternative to using a string as a key? Pin
jschell3-Jan-12 10:40
jschell3-Jan-12 10:40 
GeneralRe: Alternative to using a string as a key? Pin
venomation3-Jan-12 11:01
venomation3-Jan-12 11:01 
GeneralRe: Alternative to using a string as a key? Pin
jschell4-Jan-12 8:12
jschell4-Jan-12 8:12 
GeneralRe: Alternative to using a string as a key? Pin
SledgeHammer014-Jan-12 9:26
SledgeHammer014-Jan-12 9:26 
GeneralRe: Alternative to using a string as a key? Pin
jschell6-Jan-12 8:29
jschell6-Jan-12 8:29 
AnswerRe: Alternative to using a string as a key? Pin
Shameel3-Jan-12 16:22
professionalShameel3-Jan-12 16:22 
AnswerRe: Alternative to using a string as a key? Pin
BillWoodruff3-Jan-12 19:28
professionalBillWoodruff3-Jan-12 19:28 
If your goal is to make it easy for you to select one of the available, limited, set of choices of "unique keys" during development: then using an Enum makes very good sense: it gives you Intellisense display of the choices possible.

But that Enum could just as well be passed, as Luc pointed out, as an argument to a constructor overload or whatever for the OffScreenSensor class: unless, of course, you make use of that second parameter in other important ways in the function you call.

But, what's the usage/relationship of the new "OffScreenSensor" you create and pass as a parameter, along with the second parameter that serves a unique key to some (we assume) existing OffScreenSensor you are going to access by using the unique key?

That's what's puzzling here. Is the new "OffScreenSensor" some temporary entity that's never preserved: outside the scope of the functional call: never entered in your storage (dictionary or whatever) for the other (assume instances of ?) OffScreenSensor's ?

Are the OffScreenSensor instances in the (assumed) Dictionary sub-classed "flavors" of some master class OffScreenSensor ?

Is there a security aspect here ?

Without some sense of what your "big picture" goals are here, it's difficult to respond meaningfully.

In a technical forum like this, "vague" is automatically amplified Smile | :)

best, Bill
"It is the mark of an educated mind to be able to entertain a thought without accepting it." Aristotle

AnswerRe: Alternative to using a string as a key? Pin
V.3-Jan-12 20:34
professionalV.3-Jan-12 20:34 
AnswerRe: Alternative to using a string as a key? Pin
Subin Mavunkal4-Jan-12 18:06
Subin Mavunkal4-Jan-12 18:06 
Questionhow to take a table name from a text box! Pin
mpvkrishnadhar3-Jan-12 7:39
mpvkrishnadhar3-Jan-12 7:39 
AnswerRe: how to take a table name from a text box! Pin
PIEBALDconsult3-Jan-12 7:43
mvePIEBALDconsult3-Jan-12 7:43 
GeneralRe: how to take a table name from a text box! Pin
mpvkrishnadhar3-Jan-12 7:46
mpvkrishnadhar3-Jan-12 7:46 
AnswerRe: how to take a table name from a text box! Pin
Luc Pattyn3-Jan-12 8:05
sitebuilderLuc Pattyn3-Jan-12 8:05 
AnswerRe: how to take a table name from a text box! Pin
Luc Pattyn3-Jan-12 8:04
sitebuilderLuc Pattyn3-Jan-12 8:04 
SuggestionRe: how to take a table name from a text box! Pin
AHSAN1114-Jan-12 4:38
professionalAHSAN1114-Jan-12 4:38 
GeneralRe: how to take a table name from a text box! Pin
Luc Pattyn4-Jan-12 4:49
sitebuilderLuc Pattyn4-Jan-12 4:49 
AnswerRe: how to take a table name from a text box! Pin
AHSAN1113-Jan-12 22:02
professionalAHSAN1113-Jan-12 22:02 
GeneralRe: how to take a table name from a text box! Pin
Luc Pattyn4-Jan-12 3:14
sitebuilderLuc Pattyn4-Jan-12 3:14 
GeneralRe: how to take a table name from a text box! Pin
AHSAN1114-Jan-12 4:31
professionalAHSAN1114-Jan-12 4:31 
AnswerRe: how to take a table name from a text box! Pin
Luc Pattyn4-Jan-12 4:41
sitebuilderLuc Pattyn4-Jan-12 4:41 
GeneralRe: how to take a table name from a text box! Pin
mpvkrishnadhar4-Jan-12 4:23
mpvkrishnadhar4-Jan-12 4:23 
AnswerRe: how to take a table name from a text box! Pin
Luc Pattyn4-Jan-12 4:34
sitebuilderLuc Pattyn4-Jan-12 4:34 
GeneralRe: how to take a table name from a text box! Pin
mpvkrishnadhar4-Jan-12 4:53
mpvkrishnadhar4-Jan-12 4:53 
GeneralRe: how to take a table name from a text box! Pin
AHSAN1115-Jan-12 2:18
professionalAHSAN1115-Jan-12 2:18 

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.