Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: Making a count of unique elements in an array Pin
TrooperIronMan15-Feb-07 3:32
TrooperIronMan15-Feb-07 3:32 
GeneralRe: Making a count of unique elements in an array Pin
Guffa14-Feb-07 15:11
Guffa14-Feb-07 15:11 
GeneralRe: Making a count of unique elements in an array Pin
TrooperIronMan15-Feb-07 13:22
TrooperIronMan15-Feb-07 13:22 
QuestionFlash video files Pin
alostdruid14-Feb-07 11:18
alostdruid14-Feb-07 11:18 
QuestionSerial Communication using SerialDataReceivedEventHandler Pin
cocoonwls14-Feb-07 10:42
cocoonwls14-Feb-07 10:42 
QuestionCreate report ... Word / pdf or new form Pin
Rick van Woudenberg14-Feb-07 10:15
Rick van Woudenberg14-Feb-07 10:15 
AnswerRe: Create report ... Word / pdf or new form Pin
cocoonwls14-Feb-07 10:27
cocoonwls14-Feb-07 10:27 
QuestionCollection of objects Pin
Wayne Phipps14-Feb-07 9:38
Wayne Phipps14-Feb-07 9:38 
Hi guys,

I have a class named Configuration which is basically a collection of configItems.

Each config item has the following:

ID (allows persisting to file/database)
Name (a friendly way of searching for the item)
Value (self explanatory)

At present, ID is an integer type and both Name and Value members are string types.

However, the value may actually represent a boolean, integer, string, decimal and potentially other types.

The annoyance is currently having to cast the value to and from string to whaterver object type is required.
It would be great if the Value member could be the correct object type without having to cast each time.

I guess being able to have a generic member would be ideal but from my knowledge of generics, this doesn't appear possible.

How do you guys approach situations like this? What would you do?


Regards

Wayne Phipps
____________

Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog

AnswerRe: Collection of objects Pin
Guffa14-Feb-07 11:30
Guffa14-Feb-07 11:30 
QuestionEscaping special characters in SQL Statement after form submission Pin
dboy22114-Feb-07 9:30
dboy22114-Feb-07 9:30 
AnswerRe: Escaping special characters in SQL Statement after form submission Pin
Wayne Phipps14-Feb-07 9:48
Wayne Phipps14-Feb-07 9:48 
AnswerRe: Escaping special characters in SQL Statement after form submission Pin
Abisodun14-Feb-07 9:55
Abisodun14-Feb-07 9:55 
Questionparsing dicom file Pin
rajuhero14-Feb-07 9:06
rajuhero14-Feb-07 9:06 
AnswerRe: parsing Pin
Colin Angus Mackay14-Feb-07 9:10
Colin Angus Mackay14-Feb-07 9:10 
QuestionHow to create folder by C#? Pin
abalbo14-Feb-07 8:53
abalbo14-Feb-07 8:53 
AnswerRe: How to create folder by C#? Pin
Stefan Troschuetz14-Feb-07 9:00
Stefan Troschuetz14-Feb-07 9:00 
AnswerRe: How to create folder by C#? Pin
MaxRelaxman14-Feb-07 9:04
MaxRelaxman14-Feb-07 9:04 
QuestionTwo Window Applications - One Installation Pin
Khoramdin14-Feb-07 8:25
Khoramdin14-Feb-07 8:25 
AnswerRe: Two Window Applications - One Installation Pin
Colin Angus Mackay14-Feb-07 9:09
Colin Angus Mackay14-Feb-07 9:09 
QuestionRe: Two Window Applications - One Installation Pin
Khoramdin14-Feb-07 14:33
Khoramdin14-Feb-07 14:33 
QuestionHELP Integrate MALAB Pin
abbd14-Feb-07 7:35
abbd14-Feb-07 7:35 
AnswerRe: HELP Integrate MATLAB Pin
andyharman14-Feb-07 8:27
professionalandyharman14-Feb-07 8:27 
QuestionAppDomain - Loading a assemly Pin
AJ12314-Feb-07 6:22
AJ12314-Feb-07 6:22 
AnswerRe: AppDomain - Loading a assemly Pin
Luc Pattyn14-Feb-07 7:00
sitebuilderLuc Pattyn14-Feb-07 7:00 
QuestionC# Pin
vasini14-Feb-07 6:02
vasini14-Feb-07 6:02 

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.