Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
AnswerRe: Array of Structs overwrite problem Pin
Alan N13-Apr-09 9:49
Alan N13-Apr-09 9:49 
GeneralRe: Array of Structs overwrite problem Pin
Luc 64801113-Apr-09 10:29
Luc 64801113-Apr-09 10:29 
QuestionCross-thread error. Pin
Fired.Fish.Gmail13-Apr-09 4:58
Fired.Fish.Gmail13-Apr-09 4:58 
AnswerRe: Cross-thread error. Pin
Colin Angus Mackay13-Apr-09 5:06
Colin Angus Mackay13-Apr-09 5:06 
GeneralRe: Cross-thread error. Pin
Fired.Fish.Gmail13-Apr-09 5:20
Fired.Fish.Gmail13-Apr-09 5:20 
GeneralRe: Cross-thread error. Pin
Henry Minute13-Apr-09 5:22
Henry Minute13-Apr-09 5:22 
AnswerRe: Cross-thread error. Pin
Luc 64801113-Apr-09 5:39
Luc 64801113-Apr-09 5:39 
Questionstruct or class? Pin
Jammer13-Apr-09 4:27
Jammer13-Apr-09 4:27 
Hi All,

I'm just writing some core 'primitives' in a class library for data processing purposes. These primitives are things like Names, Addresses, Telephone numbers etc ... standard user data stuff.

At present I've defined them as structs but I'm wondering if this is the most inexpensive way to structure them. The objects mostly consist of strings and maybe a couple of other structs. The issue is that we are going to be processing millions of these and in most cases some bits require transmission over Wcf. At some points the Master object will pass into a process via Wcf a subset of its data and then process the results back into itself.

My concern comes from the differences between holding these as value types and by doing so forcing the runtime to make copies of the actual data rather than references. Once some data hits a DataContract it's effectively going to be copied again, sent to the process, that process will send it back only to be copied again when the master object processes the results.

I feel like I should rewrite them as classes, any input would be appreciated.

Cheers,


AnswerRe: struct or class? Pin
DaveyM6913-Apr-09 4:34
professionalDaveyM6913-Apr-09 4:34 
GeneralRe: struct or class? Pin
Colin Angus Mackay13-Apr-09 4:38
Colin Angus Mackay13-Apr-09 4:38 
AnswerRe: struct or class? Pin
PIEBALDconsult13-Apr-09 5:14
mvePIEBALDconsult13-Apr-09 5:14 
GeneralRe: struct or class? Pin
Colin Angus Mackay13-Apr-09 5:22
Colin Angus Mackay13-Apr-09 5:22 
QuestionSql Backup Pin
nagendra.vk13-Apr-09 4:24
nagendra.vk13-Apr-09 4:24 
AnswerRe: Sql Backup Pin
Colin Angus Mackay13-Apr-09 4:43
Colin Angus Mackay13-Apr-09 4:43 
QuestionHandling Exceptions from another thread Pin
Fayu13-Apr-09 4:02
Fayu13-Apr-09 4:02 
AnswerRe: Handling Exceptions from another thread Pin
Fayu13-Apr-09 6:17
Fayu13-Apr-09 6:17 
GeneralRe: Handling Exceptions from another thread Pin
Luc 64801113-Apr-09 7:22
Luc 64801113-Apr-09 7:22 
Questionmaster window Pin
EmZan13-Apr-09 3:20
EmZan13-Apr-09 3:20 
AnswerRe: master window Pin
Colin Angus Mackay13-Apr-09 3:50
Colin Angus Mackay13-Apr-09 3:50 
GeneralRe: master window Pin
EmZan13-Apr-09 4:48
EmZan13-Apr-09 4:48 
GeneralRe: master window Pin
Colin Angus Mackay13-Apr-09 5:00
Colin Angus Mackay13-Apr-09 5:00 
GeneralRe: master window Pin
EmZan13-Apr-09 5:01
EmZan13-Apr-09 5:01 
GeneralRe: master window Pin
Colin Angus Mackay13-Apr-09 5:03
Colin Angus Mackay13-Apr-09 5:03 
AnswerRe: master window Pin
Fayu13-Apr-09 4:03
Fayu13-Apr-09 4:03 
GeneralRe: master window Pin
EmZan13-Apr-09 4:49
EmZan13-Apr-09 4:49 

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.