Click here to Skip to main content
15,909,324 members
Home / Discussions / C#
   

C#

 
GeneralRe: Crazy question about reflection Pin
Guffa28-Sep-05 9:25
Guffa28-Sep-05 9:25 
GeneralRe: Crazy question about reflection Pin
Colin Angus Mackay28-Sep-05 12:36
Colin Angus Mackay28-Sep-05 12:36 
GeneralRe: Crazy question about reflection Pin
Guffa29-Sep-05 1:06
Guffa29-Sep-05 1:06 
QuestionBroadcast a Windows Message (C#) Pin
emarborg27-Sep-05 11:27
emarborg27-Sep-05 11:27 
AnswerRe: Broadcast a Windows Message (C#) Pin
Dave Kreskowiak27-Sep-05 12:30
mveDave Kreskowiak27-Sep-05 12:30 
QuestionDataGridView.ColumnHeadersDefaultCellStyle Pin
Drew McGhie27-Sep-05 10:10
Drew McGhie27-Sep-05 10:10 
QuestionWierd serialization behaviour Pin
jolofsson27-Sep-05 9:43
jolofsson27-Sep-05 9:43 
AnswerRe: Wierd serialization behaviour Pin
turbochimp28-Sep-05 2:08
turbochimp28-Sep-05 2:08 
I'm not clear on what the desired effect is, here:

1. You want the event serialized, but want some way of bypassing or simplifying the UITask type? - or -
2. You just want to skip serializing the event altogether?

In case 1, there's really no shortcut - either implement ISerializable and deal with it in GetObjectData and a deserialization constructor, or come up with a way to mark UITask as serializable.

In case 2, you can mark the event with a [Field:NonSerialized] attribute, or mark the delegate with a [NonSerialized] attribute.

Of the two choices, I would vote for not serializing the event. When you serialize an event, you're making a request to serialize the entire event subscriber graph, and since it's not usually completely knowable what types may be subscribing to your event (or whether they're serializable), it's a risky move as well as a potentially slow one.

Here's a link to a discussion on the topic:
http://weblogs.asp.net/rosherove/archive/2004/12/29/343659.aspx[^]

Hope this helps.

The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’

QuestionEdit .msi database programatically Pin
Asad Hussain27-Sep-05 9:07
Asad Hussain27-Sep-05 9:07 
AnswerRe: Edit .msi database programatically Pin
Christian Graus27-Sep-05 9:25
protectorChristian Graus27-Sep-05 9:25 
AnswerRe: Edit .msi database programatically Pin
Dave Kreskowiak27-Sep-05 12:28
mveDave Kreskowiak27-Sep-05 12:28 
AnswerRe: Edit .msi database programatically Pin
Sean Michael Murphy28-Sep-05 8:35
Sean Michael Murphy28-Sep-05 8:35 
QuestionAccess XML element directly Pin
Seraphin27-Sep-05 6:31
Seraphin27-Sep-05 6:31 
AnswerRe: Access XML element directly Pin
Gavin Jeffrey27-Sep-05 8:22
Gavin Jeffrey27-Sep-05 8:22 
QuestionListView in details view with values... Pin
Niklas Ulvinge27-Sep-05 6:11
Niklas Ulvinge27-Sep-05 6:11 
QuestionSOAP Web Service in Win Forms Application? Pin
jkersch27-Sep-05 6:01
jkersch27-Sep-05 6:01 
AnswerRe: SOAP Web Service in Win Forms Application? Pin
Heath Stewart27-Sep-05 6:24
protectorHeath Stewart27-Sep-05 6:24 
QuestionOutOfMemoryException when allocating large buffer Pin
mkomsa27-Sep-05 5:46
mkomsa27-Sep-05 5:46 
AnswerRe: OutOfMemoryException when allocating large buffer Pin
Dave Kreskowiak27-Sep-05 6:57
mveDave Kreskowiak27-Sep-05 6:57 
QuestionPropertygrid Pin
Piovra_27-Sep-05 4:50
Piovra_27-Sep-05 4:50 
AnswerRe: Propertygrid Pin
Sean Michael Murphy28-Sep-05 9:16
Sean Michael Murphy28-Sep-05 9:16 
QuestionOutOfMemoryException only when mdi child is maximized? Pin
elf2327-Sep-05 4:44
elf2327-Sep-05 4:44 
AnswerRe: OutOfMemoryException only when mdi child is maximized? Pin
Dave Kreskowiak27-Sep-05 6:28
mveDave Kreskowiak27-Sep-05 6:28 
GeneralRe: OutOfMemoryException only when mdi child is maximized? Pin
elf2327-Sep-05 6:55
elf2327-Sep-05 6:55 
GeneralRe: OutOfMemoryException only when mdi child is maximized? Pin
Dave Kreskowiak27-Sep-05 7:10
mveDave Kreskowiak27-Sep-05 7:10 

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.